mirror of
https://codeberg.org/ashley/poke
synced 2025-05-30 02:59:43 +00:00
Update css/player-base.js
This commit is contained in:
parent
f7831ad85e
commit
b75dc35a6b
@ -1,7 +1,7 @@
|
|||||||
// in the beginning.... god made mrrprpmnaynayaynaynayanyuwuuuwmauwnwanwaumawp :p
|
// in the beginning.... god made mrrprpmnaynayaynaynayanyuwuuuwmauwnwanwaumawp :p
|
||||||
var _yt_player = videojs;
|
var _yt_player = videojs;
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
// video.js 8 init - source can be seen in https://poketube.fun/static/vjs.min.js or the vjs.min.js file
|
// video.js 8 init - source can be seen in https://poketube.fun/static/vjs.min.js or the vjs.min.js file
|
||||||
const video = videojs('video', {
|
const video = videojs('video', {
|
||||||
controls: true,
|
controls: true,
|
||||||
@ -14,7 +14,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
const vidKey = new URLSearchParams(window.location.search).get('v');
|
const vidKey = new URLSearchParams(window.location.search).get('v');
|
||||||
localStorage.setItem(`progress-${vidKey}`, 0);
|
localStorage.setItem(`progress-${vidKey}`, 0);
|
||||||
|
|
||||||
|
// raw media elements
|
||||||
|
const videoEl = document.getElementById('video');
|
||||||
const audio = document.getElementById('aud');
|
const audio = document.getElementById('aud');
|
||||||
|
|
||||||
const audioSrc = audio.getAttribute('src');
|
const audioSrc = audio.getAttribute('src');
|
||||||
const vidSrcObj = video.src();
|
const vidSrcObj = video.src();
|
||||||
const videoSrc = Array.isArray(vidSrcObj) ? vidSrcObj[0].src : vidSrcObj;
|
const videoSrc = Array.isArray(vidSrcObj) ? vidSrcObj[0].src : vidSrcObj;
|
||||||
@ -153,9 +156,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (qua !== "medium") {
|
if (qua !== "medium") {
|
||||||
// attach retry & ready markers
|
// attach retry & ready markers to the real elements
|
||||||
attachRetry(audio, audioSrc, () => { audioReady = true; });
|
attachRetry(audio, audioSrc, () => { audioReady = true; });
|
||||||
attachRetry(video.tech().el(), videoSrc, () => { videoReady = true; });
|
attachRetry(videoEl, videoSrc, () => { videoReady = true; });
|
||||||
|
|
||||||
// Sync when playback starts
|
// Sync when playback starts
|
||||||
video.on('play', () => {
|
video.on('play', () => {
|
||||||
@ -217,6 +220,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// hai!! if ur asking why are they here - its for smth in the future!!!!!!
|
// hai!! if ur asking why are they here - its for smth in the future!!!!!!
|
||||||
|
|
||||||
const FORMATS = {
|
const FORMATS = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user