Fix: Scroll position not locked when no trailer being played

pull/16/head 1.1.4
Juraj Nyíri 3 years ago
parent 9cc8bc6d7b
commit 64fc5d76df

@ -19183,6 +19183,8 @@ const hasEpisodes = (media) => {
const isVideoFullScreen = (_this) => { const isVideoFullScreen = (_this) => {
const videoPlayer = _this.getElementsByClassName('videoPlayer')[0]; const videoPlayer = _this.getElementsByClassName('videoPlayer')[0];
const video = videoPlayer.children[0]; const video = videoPlayer.children[0];
if (!video)
return false;
const body = document.getElementsByTagName('body')[0]; const body = document.getElementsByTagName('body')[0];
return ((video.offsetWidth === body.offsetWidth && video.offsetHeight === body.offsetHeight) || return ((video.offsetWidth === body.offsetWidth && video.offsetHeight === body.offsetHeight) ||
(_this.videoElem && _this.videoElem.classList.contains('simulatedFullScreen'))); (_this.videoElem && _this.videoElem.classList.contains('simulatedFullScreen')));

@ -79,6 +79,7 @@ const hasEpisodes = (media: Array<Record<string, any>>): boolean => {
const isVideoFullScreen = (_this: any): boolean => { const isVideoFullScreen = (_this: any): boolean => {
const videoPlayer = _this.getElementsByClassName('videoPlayer')[0] as HTMLElement; const videoPlayer = _this.getElementsByClassName('videoPlayer')[0] as HTMLElement;
const video = videoPlayer.children[0] as any; const video = videoPlayer.children[0] as any;
if (!video) return false;
const body = document.getElementsByTagName('body')[0]; const body = document.getElementsByTagName('body')[0];
return ( return (
(video.offsetWidth === body.offsetWidth && video.offsetHeight === body.offsetHeight) || (video.offsetWidth === body.offsetWidth && video.offsetHeight === body.offsetHeight) ||

Loading…
Cancel
Save