video: prevent closing when video fullscreen

cap
Varun Patil 2022-12-06 13:20:13 -08:00
parent 65f8a4bc4c
commit b5bdc0b0bf
1 changed files with 8 additions and 0 deletions

View File

@ -112,6 +112,14 @@ class VideoContentSetup {
this.destroyVideo(pswp.currSlide.content);
}
});
// Prevent closing when video fullscreen is active
pswp.on("pointerMove", (e) => {
const plyr: Plyr = (<any>pswp.currSlide.content)?.plyr;
if (plyr?.fullscreen.active) {
e.preventDefault();
}
});
}
getHLSsrc(content: any) {