From 4a6c62f68b9dbc676551d07a0ae8186ceeda131b Mon Sep 17 00:00:00 2001 From: ashley Date: Tue, 24 Sep 2024 20:30:39 +0000 Subject: [PATCH] add canplay --- css/player-base.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/css/player-base.js b/css/player-base.js index 0b6a875d..4e0406ca 100644 --- a/css/player-base.js +++ b/css/player-base.js @@ -83,6 +83,13 @@ document.addEventListener("DOMContentLoaded", () => { } }); + video.on('canplay', () => { + if (!video.paused()) { + video.play(); + audio.play(); + } + }); + video.on('seeking', handleSeek); video.on('seeked', () => {