Update html/watch.ejs
This commit is contained in:
parent
8a86cf3393
commit
98d5e90bad
@ -1023,7 +1023,7 @@ Offical Discord Server! :3
|
||||
});
|
||||
%>
|
||||
|
||||
<% if (itag && !qua) { %>
|
||||
<% if (itag && qua !== "medium") { %>
|
||||
<audio id="aud" preload>
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=<%=itag%>&local=true" type="video/mp4" />
|
||||
</audio>
|
||||
@ -1040,7 +1040,7 @@ Offical Discord Server! :3
|
||||
</noscript>
|
||||
|
||||
<video poster="<%- media_proxy_url %>/proxy?url=https://i.ytimg.com/vi/<%= VideoData.videoId %>/hqdefault.jpg" class="video-js player video-ambient-container" id="video" style="border-radius: 16px; box-sizing: border-box; min-width: 100%; display: block;" preload>
|
||||
<% if (isvidious) { %>
|
||||
<% if (isvidious) { %>
|
||||
<% if (!qua) { %>
|
||||
<%
|
||||
let itag = '136'; // Default itag
|
||||
@ -1072,6 +1072,22 @@ Offical Discord Server! :3
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=<%=ultraItag%>&local=true" type="video/mp4" label="ultrahigh" selected="true">
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (qua === "4k") { %>
|
||||
<%
|
||||
let fourKItag = null;
|
||||
VideoData.adaptiveFormats.forEach(format => {
|
||||
if (format.itag == '313') {
|
||||
fourKItag = '313';
|
||||
} else if (format.itag == '401' && !fourKItag) {
|
||||
fourKItag = '401';
|
||||
}
|
||||
});
|
||||
%>
|
||||
<% if (fourKItag) { %>
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=<%=fourKItag%>&local=true" type="video/mp4" label="4k" selected="true">
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
@ -1113,13 +1129,21 @@ Offical Discord Server! :3
|
||||
|
||||
<div class="pwp">
|
||||
<%
|
||||
// Check if ultrahigh sources exist
|
||||
// Check if ultrahigh sources (2K) exist
|
||||
let uhdAvailable = false;
|
||||
VideoData.adaptiveFormats.forEach(format => {
|
||||
if (format.itag == '400' || format.itag == '271') {
|
||||
uhdAvailable = true;
|
||||
}
|
||||
});
|
||||
|
||||
// Check if 4K sources exist
|
||||
let fourKAvailable = false;
|
||||
VideoData.adaptiveFormats.forEach(format => {
|
||||
if (format.itag == '313' || format.itag == '401') {
|
||||
fourKAvailable = true;
|
||||
}
|
||||
});
|
||||
%>
|
||||
|
||||
<% if (!qua) { %>
|
||||
@ -1128,6 +1152,9 @@ Offical Discord Server! :3
|
||||
<% if (uhdAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=ultrahigh"><i style="display: block;" title="2K Definition" class="fa-light fa-2k-definition"></i> 2K Definition</a>
|
||||
<% } %>
|
||||
<% if (fourKAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=4k"><i style="display: block;" title="4K Definition" class="fa-light fa-4k-definition"></i> 4K Definition</a>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (qua === "medium") { %>
|
||||
@ -1136,14 +1163,30 @@ Offical Discord Server! :3
|
||||
<% if (uhdAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=ultrahigh"><i style="display: block;" title="2K Definition" class="fa-light fa-2k-definition"></i> 2K Definition</a>
|
||||
<% } %>
|
||||
<% if (fourKAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=4k"><i style="display: block;" title="4K Definition" class="fa-light fa-4k-definition"></i> 4K Definition</a>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (qua === "ultrahigh" && uhdAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>"><i style="display: block;" title="High Definition" class="fa-light fa-high-definition"></i> High Definition</a>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=medium"><i style="display: block;" title="Standard Definition" class="fa-light fa-standard-definition"></i> Standard Definition</a>
|
||||
<a><i style="display: block;" title="2K Definition [Current]" class="fa-solid fa-2k-definition"></i> 2K Definition</a>
|
||||
<% if (fourKAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=4k"><i style="display: block;" title="4K Definition" class="fa-light fa-4k-definition"></i> 4K Definition</a>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (qua === "4k" && fourKAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>"><i style="display: block;" title="High Definition" class="fa-light fa-high-definition"></i> High Definition</a>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=medium"><i style="display: block;" title="Standard Definition" class="fa-light fa-standard-definition"></i> Standard Definition</a>
|
||||
<% if (uhdAvailable) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>&quality=ultrahigh"><i style="display: block;" title="2K Definition" class="fa-light fa-2k-definition"></i> 2K Definition</a>
|
||||
<% } %>
|
||||
<a><i style="display: block;" title="4K Definition [Current]" class="fa-solid fa-4k-definition"></i> 4K Definition</a>
|
||||
<% } %>
|
||||
|
||||
|
||||
<input type="checkbox" class="v" id="box" style="display:none">
|
||||
<label class="h" for="box">
|
||||
<div class="fnt">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user