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();
|
||||
|
||||
this.seek_done = true;
|
||||
this.doneStartup = false;
|
||||
this.needsFastSeekRestore = false;
|
||||
this.customVideoTitle = null;
|
||||
|
||||
@@ -429,18 +428,19 @@ class ClapperPlayer extends PlayerBase
|
||||
debug(`URI loaded: ${uri}`);
|
||||
this.needsTocUpdate = true;
|
||||
|
||||
if(!this.doneStartup) {
|
||||
this.doneStartup = true;
|
||||
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();
|
||||
|
||||
if(settings.get_boolean('fullscreen-auto')) {
|
||||
const root = player.widget.get_root();
|
||||
const clapperWidget = root.get_child();
|
||||
if(!clapperWidget.isFullscreenMode) {
|
||||
this.playOnFullscreen = true;
|
||||
root.fullscreen();
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.play();
|
||||
|
Reference in New Issue
Block a user