mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:57:58 +01:00
test commit tbh
This commit is contained in:
parent
76a6f4b101
commit
9de47441af
1 changed files with 11 additions and 10 deletions
|
@ -61,9 +61,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
||||||
if (isVideoBuffered()) {
|
if (isVideoBuffered()) {
|
||||||
audio.play();
|
audio.play();
|
||||||
} else {
|
|
||||||
video.pause();
|
|
||||||
audio.pause();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -77,22 +74,25 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
if (isVideoBuffered()) {
|
if (isVideoBuffered()) {
|
||||||
video.play();
|
video.play();
|
||||||
}
|
}
|
||||||
audio.play(); // Ensure audio is playing after seek
|
audio.play(); // audio is playing after seek
|
||||||
});
|
});
|
||||||
|
|
||||||
video.on('volumechange', syncVolume);
|
video.on('volumechange', syncVolume);
|
||||||
audio.addEventListener('volumechange', syncVolumeWithVideo);
|
audio.addEventListener('volumechange', syncVolumeWithVideo);
|
||||||
|
|
||||||
// Listen for media control events
|
// Listen for media control events
|
||||||
document.addEventListener('play', () => {
|
document.addEventListener('play', (e) => {
|
||||||
video.play();
|
if (e.target === video) {
|
||||||
audio.play();
|
audio.play();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('pause', () => {
|
document.addEventListener('pause', (e) => {
|
||||||
video.pause();
|
if (e.target === video) {
|
||||||
audio.pause();
|
audio.pause();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('fullscreenchange', () => {
|
document.addEventListener('fullscreenchange', () => {
|
||||||
if (!document.fullscreenElement) {
|
if (!document.fullscreenElement) {
|
||||||
video.pause();
|
video.pause();
|
||||||
|
@ -102,6 +102,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
window.pokePlayer = {
|
window.pokePlayer = {
|
||||||
ver:`16-vjs-${videojs.VERSION}`,
|
ver:`16-vjs-${videojs.VERSION}`,
|
||||||
canHasAmbientMode:true,
|
canHasAmbientMode:true,
|
||||||
|
|
Loading…
Reference in a new issue