From 9de47441af9d3c0c179b4f15946823c66c1f4831 Mon Sep 17 00:00:00 2001 From: ashley Date: Wed, 25 Sep 2024 18:38:16 +0000 Subject: [PATCH] test commit tbh --- css/player-base.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/css/player-base.js b/css/player-base.js index bf8840be..75c2f3a6 100644 --- a/css/player-base.js +++ b/css/player-base.js @@ -61,9 +61,6 @@ document.addEventListener("DOMContentLoaded", () => { if (isVideoBuffered()) { audio.play(); - } else { - video.pause(); - audio.pause(); } }); @@ -77,22 +74,25 @@ document.addEventListener("DOMContentLoaded", () => { if (isVideoBuffered()) { video.play(); } - audio.play(); // Ensure audio is playing after seek + audio.play(); // audio is playing after seek }); video.on('volumechange', syncVolume); audio.addEventListener('volumechange', syncVolumeWithVideo); // Listen for media control events - document.addEventListener('play', () => { - video.play(); - audio.play(); + document.addEventListener('play', (e) => { + if (e.target === video) { + audio.play(); + } }); - document.addEventListener('pause', () => { - video.pause(); - audio.pause(); + document.addEventListener('pause', (e) => { + if (e.target === video) { + audio.pause(); + } }); + document.addEventListener('fullscreenchange', () => { if (!document.fullscreenElement) { video.pause(); @@ -102,6 +102,7 @@ document.addEventListener("DOMContentLoaded", () => { } }); + window.pokePlayer = { ver:`16-vjs-${videojs.VERSION}`, canHasAmbientMode:true,