video: keep placeholder

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/504/head
Varun Patil 2023-03-19 01:51:21 -07:00
parent 17162ed5b3
commit 09ab876ebd
1 changed files with 9 additions and 1 deletions

View File

@ -44,6 +44,10 @@ class VideoContentSetup {
lightbox.on("contentDeactivate", this.onContentDeactivate.bind(this)); lightbox.on("contentDeactivate", this.onContentDeactivate.bind(this));
lightbox.on("contentResize", this.onContentResize.bind(this)); lightbox.on("contentResize", this.onContentResize.bind(this));
lightbox.addFilter(
"isKeepingPlaceholder",
this.isKeepingPlaceholder.bind(this)
);
lightbox.addFilter("isContentZoomable", this.isContentZoomable.bind(this)); lightbox.addFilter("isContentZoomable", this.isContentZoomable.bind(this));
lightbox.addFilter( lightbox.addFilter(
"useContentPlaceholder", "useContentPlaceholder",
@ -462,10 +466,14 @@ class VideoContentSetup {
} }
} }
isContentZoomable(isZoomable, content) { isContentZoomable(isZoomable: boolean, content) {
return !isVideoContent(content) && isZoomable; return !isVideoContent(content) && isZoomable;
} }
isKeepingPlaceholder(keep: boolean, content) {
return isVideoContent(content) || keep;
}
onContentActivate({ content }) { onContentActivate({ content }) {
this.initVideo(content); this.initVideo(content);
} }