psvideo: prevent illegal play attempts

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-04-12 05:40:42 -07:00
parent 148f0a6ee1
commit a4785efcdc
1 changed files with 2 additions and 2 deletions

View File

@ -227,7 +227,7 @@ class VideoContentSetup {
});
setTimeout(() => {
content.videojs.play(); // iOS needs this
content.videojs?.play(); // iOS needs this
}, 200);
let canPlay = false;
@ -292,7 +292,7 @@ class VideoContentSetup {
}
initPlyr(content: VideoContent) {
if (content.plyr) return;
if (content.plyr || !content.videojs || !content.element) return;
content.videoElement = content.videojs?.el()?.querySelector("video");
if (!content.videoElement) return;