psvideo: make another attempt to play

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/579/head
Varun Patil 2023-04-17 00:34:36 -07:00
parent 59c186ab8e
commit 24890f0103
1 changed files with 6 additions and 3 deletions

View File

@ -226,9 +226,9 @@ class VideoContentSetup {
}
});
setTimeout(() => {
content.videojs?.play(); // iOS needs this
}, 200);
// Play the video (hopefully)
const playWithDelay = () => setTimeout(() => content.videojs?.play(), 100);
playWithDelay();
let canPlay = false;
content.videojs.on("canplay", () => {
@ -240,6 +240,9 @@ class VideoContentSetup {
// Hide the preview image
content.placeholder?.element?.setAttribute("hidden", "true");
// Another attempt to play the video
playWithDelay();
});
content.videojs.qualityLevels()?.on("addqualitylevel", (e) => {