mirror of
https://codeberg.org/ashley/poke.git
synced 2025-06-07 14:23:02 -04:00
Update css/player-base.js
This commit is contained in:
parent
f7831ad85e
commit
b75dc35a6b
1 changed files with 8 additions and 4 deletions
|
@ -14,7 +14,10 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
const vidKey = new URLSearchParams(window.location.search).get('v');
|
||||
localStorage.setItem(`progress-${vidKey}`, 0);
|
||||
|
||||
// raw media elements
|
||||
const videoEl = document.getElementById('video');
|
||||
const audio = document.getElementById('aud');
|
||||
|
||||
const audioSrc = audio.getAttribute('src');
|
||||
const vidSrcObj = video.src();
|
||||
const videoSrc = Array.isArray(vidSrcObj) ? vidSrcObj[0].src : vidSrcObj;
|
||||
|
@ -153,9 +156,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
});
|
||||
|
||||
if (qua !== "medium") {
|
||||
// attach retry & ready markers
|
||||
// attach retry & ready markers to the real elements
|
||||
attachRetry(audio, audioSrc, () => { audioReady = true; });
|
||||
attachRetry(video.tech().el(), videoSrc, () => { videoReady = true; });
|
||||
attachRetry(videoEl, videoSrc, () => { videoReady = true; });
|
||||
|
||||
// Sync when playback starts
|
||||
video.on('play', () => {
|
||||
|
@ -217,6 +220,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||
});
|
||||
|
||||
|
||||
|
||||
// hai!! if ur asking why are they here - its for smth in the future!!!!!!
|
||||
|
||||
const FORMATS = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue