From 8d7fb761f77656ab6f2b858ba3b71ff1c7a05548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Fri, 9 Apr 2021 19:58:33 +0200 Subject: [PATCH] Always reset auto fullscreen boolean value Otherwise we would keep checking the settings with each playlist file and accidentally entered fullscreen when that setting value was changed in middle of playback. --- src/player.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/player.js b/src/player.js index cc254950..fe70205e 100644 --- a/src/player.js +++ b/src/player.js @@ -430,21 +430,23 @@ class ClapperPlayer extends PlayerBase debug(`URI loaded: ${uri}`); this.needsTocUpdate = true; - if(this.canAutoFullscreen && settings.get_boolean('fullscreen-auto')) { - const root = player.widget.get_root(); - const clapperWidget = root.get_child(); + if(this.canAutoFullscreen) { this.canAutoFullscreen = false; - /* Do not enter fullscreen when already in it - * or when in floating mode */ - if( - !clapperWidget.isFullscreenMode - && clapperWidget.controlsRevealer.reveal_child - ) { - this.playOnFullscreen = true; - root.fullscreen(); + if(settings.get_boolean('fullscreen-auto')) { + const root = player.widget.get_root(); + const clapperWidget = root.get_child(); + /* Do not enter fullscreen when already in it + * or when in floating mode */ + if( + !clapperWidget.isFullscreenMode + && clapperWidget.controlsRevealer.reveal_child + ) { + this.playOnFullscreen = true; + root.fullscreen(); - return; + return; + } } } this.play();