video: keep placeholder
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/504/head
parent
17162ed5b3
commit
09ab876ebd
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue