Update html/watch.ejs
This commit is contained in:
parent
357e54bcd3
commit
8a86cf3393
@ -1040,22 +1040,40 @@ 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 (!qua) { %>
|
||||
<%
|
||||
let itag = '136'; // Default itag
|
||||
VideoData.adaptiveFormats.forEach(format => {
|
||||
if (format.itag == '298') {
|
||||
itag = '298';
|
||||
}
|
||||
});
|
||||
%>
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=<%=itag%>&local=true" type="video/mp4; codecs="avc1.64001F, mp4a.40.2"" label="hd720" selected="true">
|
||||
<% } %>
|
||||
<% if (qua === "medium") { %>
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=18&local=true" type="video/mp4; codecs="avc1.64001F, mp4a.40.2"" label="sd360" selected="true" >
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% if (isvidious) { %>
|
||||
<% if (!qua) { %>
|
||||
<%
|
||||
let itag = '136'; // Default itag
|
||||
VideoData.adaptiveFormats.forEach(format => {
|
||||
if (format.itag == '298') {
|
||||
itag = '298';
|
||||
}
|
||||
});
|
||||
%>
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=<%=itag%>&local=true" type="video/mp4; codecs="avc1.64001F, mp4a.40.2"" label="hd720" selected="true">
|
||||
<% } %>
|
||||
|
||||
<% if (qua === "medium") { %>
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=18&local=true" type="video/mp4; codecs="avc1.64001F, mp4a.40.2"" label="sd360" selected="true">
|
||||
<% } %>
|
||||
|
||||
<% if (qua === "ultrahigh") { %>
|
||||
<%
|
||||
let ultraItag = null;
|
||||
VideoData.adaptiveFormats.forEach(format => {
|
||||
if (format.itag == '400') {
|
||||
ultraItag = '400';
|
||||
} else if (format.itag == '271' && !ultraItag) {
|
||||
ultraItag = '271';
|
||||
}
|
||||
});
|
||||
%>
|
||||
<% if (ultraItag) { %>
|
||||
<source src="<%=u%>/latest_version?id=<%=VideoData.videoId%>&itag=<%=ultraItag%>&local=true" type="video/mp4" label="ultrahigh" selected="true">
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
<% if (!isSchoolProxy) { %>
|
||||
<% if (!isvidious) { %>
|
||||
@ -1094,15 +1112,37 @@ Offical Discord Server! :3
|
||||
<% } %>
|
||||
|
||||
<div class="pwp">
|
||||
<% if (!qua) { %>
|
||||
<a><i style="display: block;" title="High Definition [Current]" class="fa-solid 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>
|
||||
<% } %>
|
||||
<%
|
||||
// Check if ultrahigh sources exist
|
||||
let uhdAvailable = false;
|
||||
VideoData.adaptiveFormats.forEach(format => {
|
||||
if (format.itag == '400' || format.itag == '271') {
|
||||
uhdAvailable = true;
|
||||
}
|
||||
});
|
||||
%>
|
||||
|
||||
<% if (qua) { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>"> <i style="display: block;" title="High Definition" class="fa-light fa-high-definition"></i> High Definition </a>
|
||||
<a><i style="display: block;" title="Standard Definition [Current]" class="fa-solid fa-standard-definition"></i> Standard Definition</a>
|
||||
<% } %>
|
||||
<% if (!qua) { %>
|
||||
<a><i style="display: block;" title="High Definition [Current]" class="fa-solid 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>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% if (qua === "medium") { %>
|
||||
<a href="/watch?v=<%=VideoData.videoId%>"><i style="display: block;" title="High Definition" class="fa-light fa-high-definition"></i> High Definition</a>
|
||||
<a><i style="display: block;" title="Standard Definition [Current]" class="fa-solid 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>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
<% 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>
|
||||
<% } %>
|
||||
|
||||
<input type="checkbox" class="v" id="box" style="display:none">
|
||||
<label class="h" for="box">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user