Merge branch 'main' into videojs

This commit is contained in:
nin0dev 2024-08-01 07:47:42 -04:00
commit 92543510a6

View file

@ -383,6 +383,9 @@ a[data-onclick="jump_to_time"] {
<script src="https://vjs.zencdn.net/8.16.1/video.min.js"></script>
<!-- css files end -->
<link href="https://vjs.zencdn.net/8.16.1/video-js.css" rel="stylesheet" />
<script src="https://vjs.zencdn.net/8.16.1/video.min.js"></script>
<% if (k.Video.Channel.Name == "7clouds") { %>
<style>
@font-face {
@ -616,7 +619,9 @@ background-color: #0000;
}
</style>
</noscript>
<script>
</script>
<% if(shortsui) { %>
<script>
// Function to apply styles after DOM has loaded
@ -765,16 +770,24 @@ background-color: #0000;
</script>
<ptd-app-iconfixer>
<script>
// Preload the icon image
var iconImage = new Image();
iconImage.src = "/css/yt-ukraine.svg";
document.addEventListener('DOMContentLoaded', function() {
var player = videojs('video');
// Wait for the icon image to load before showing it
iconImage.onload = function() {
var iconElement = document.querySelector('link[rel="icon"]');
iconElement.href = iconImage.src;
iconElement.type = "image/svg+xml";
};
<% if (!qua) { //TODO - a %>
var sources = player.currentSources();
// Add the new audio source
sources.push({
type: 'audio/mp3',
src: '<%=u%>/latest_version?id=<%=inv_vid.videoId%>&itag=140&local=true'
});
// Set the updated source list
player.src(sources);
<% } else { %>
<% } %>
});
</script>
</ptd-app-iconfixer>
<ptd-app-ejs>
@ -896,7 +909,7 @@ if your domain matches this code you are probably in poketube.fun owo:3
<div class="video-title" style="color:var(--text-color);font-family:var(--text-font-primary);;font-weight:var(--text-header-weight);font-stretch: extra-expanded;margin-top: 0px;margin-bottom: -3px;font-size: larger;line-height: 20.7px;text-align: center;">Options</div>
<a href="/customize" style="text-decoration: none;" class="dropdown__item">
<i class="fa-light fa-brush"></i>
Customize PokeTube
Customize Poke
</a>
<a href="/account-create" style="text-decoration: none;" class="dropdown__item">
@ -1055,7 +1068,8 @@ Offical Discord Server! :3
</div>
<% } %>
</noscript>
<video class="video-js player video-ambient-container" id="video" style="border-radius: 16px; box-sizing: border-box; min-width: 100%; display: block;" autoplay preload onerror="showErrorCard(event)">
<video class="video-js player video-ambient-container" id="video" style="border-radius: 16px; box-sizing: border-box; min-width: 100%; display: block;" autoplay controls>
<% if (isvidious) { %>
<% if (!qua) { %>
<%
@ -1066,12 +1080,11 @@ Offical Discord Server! :3
}
});
%>
<% if (!qua) { //TODO - a %>
<source src="<%=u%>/latest_version?id=<%=inv_vid.videoId%>&itag=140&local=true" type="audio/ogg"/>
<% } else { %>
<audio id="aud"></audio>
<% } %>
<source src="<%=u%>/latest_version?id=<%=inv_vid.videoId%>&itag=<%=itag%>&local=true" type="video/mp4; codecs=&quot;avc1.64001F, mp4a.40.2&quot;" label="hd720" selected="true">
<% } %>
<% if (qua === "medium") { %>
<source src="<%=u%>/latest_version?id=<%=inv_vid.videoId%>&itag=18&local=true" type="video/mp4; codecs=&quot;avc1.64001F, mp4a.40.2&quot;" label="sd360" selected="true" onerror="showErrorCard(event)">
@ -1109,6 +1122,7 @@ Offical Discord Server! :3
<% } %>
</video>
<% if (!a) { %>
<canvas width="12" height="6" class="ambient-canvas" id="ambient-canvas-1"></canvas>
<canvas width="12" height="6" class="ambient-canvas" id="ambient-canvas-2"></canvas>