mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
Tweak how auto fullscreen option works
When auto fullscreen is enabled, enter fullscreen on each media load unless player is in floating mode in which probably user wants it to remain.
This commit is contained in:
@@ -18,7 +18,6 @@ class ClapperPlayer extends PlayerBase
|
|||||||
super._init();
|
super._init();
|
||||||
|
|
||||||
this.seek_done = true;
|
this.seek_done = true;
|
||||||
this.doneStartup = false;
|
|
||||||
this.needsFastSeekRestore = false;
|
this.needsFastSeekRestore = false;
|
||||||
this.customVideoTitle = null;
|
this.customVideoTitle = null;
|
||||||
|
|
||||||
@@ -429,20 +428,21 @@ class ClapperPlayer extends PlayerBase
|
|||||||
debug(`URI loaded: ${uri}`);
|
debug(`URI loaded: ${uri}`);
|
||||||
this.needsTocUpdate = true;
|
this.needsTocUpdate = true;
|
||||||
|
|
||||||
if(!this.doneStartup) {
|
|
||||||
this.doneStartup = true;
|
|
||||||
|
|
||||||
if(settings.get_boolean('fullscreen-auto')) {
|
if(settings.get_boolean('fullscreen-auto')) {
|
||||||
const root = player.widget.get_root();
|
const root = player.widget.get_root();
|
||||||
const clapperWidget = root.get_child();
|
const clapperWidget = root.get_child();
|
||||||
if(!clapperWidget.isFullscreenMode) {
|
/* Do not enter fullscreen when already in it
|
||||||
|
* or when in floating mode */
|
||||||
|
if(
|
||||||
|
!clapperWidget.isFullscreenMode
|
||||||
|
&& clapperWidget.controlsRevealer.reveal_child
|
||||||
|
) {
|
||||||
this.playOnFullscreen = true;
|
this.playOnFullscreen = true;
|
||||||
root.fullscreen();
|
root.fullscreen();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.play();
|
this.play();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user