refactor(Player): use nextVideoNotificationDuration setting to trigger next video popup

This commit is contained in:
Tim 2022-11-28 12:41:00 +01:00
parent b51f607ffe
commit 0a7ef22eb6

View file

@ -342,7 +342,7 @@ const Player = ({ urlParams, queryParams }) => {
}, [videoState.paused]);
React.useEffect(() => {
if (!!settings.bingeWatching && !nextVideoPopupDismissed.current) {
if (videoState.time !== null && videoState.duration !== null && videoState.time < videoState.duration && (videoState.duration - videoState.time) <= (35 * 1000)) {
if (videoState.time !== null && videoState.duration !== null && videoState.time < videoState.duration && (videoState.duration - videoState.time) <= settings.nextVideoNotificationDuration) {
openNextVideoPopup();
} else {
closeNextVideoPopup();