mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-31 08:21:59 +02:00
Start fullscreen playback after toplevel state is changed
This commit is contained in:
@@ -14,6 +14,7 @@ class ClapperPlayer extends PlayerBase
|
|||||||
|
|
||||||
this.state = GstPlayer.PlayerState.STOPPED;
|
this.state = GstPlayer.PlayerState.STOPPED;
|
||||||
this.cursorInPlayer = false;
|
this.cursorInPlayer = false;
|
||||||
|
this.playOnFullscreen = false;
|
||||||
this.is_local_file = false;
|
this.is_local_file = false;
|
||||||
this.seek_done = true;
|
this.seek_done = true;
|
||||||
this.dragAllowed = false;
|
this.dragAllowed = false;
|
||||||
@@ -345,22 +346,24 @@ class ClapperPlayer extends PlayerBase
|
|||||||
|
|
||||||
_onUriLoaded(player, uri)
|
_onUriLoaded(player, uri)
|
||||||
{
|
{
|
||||||
|
debug(`URI loaded: ${uri}`);
|
||||||
|
|
||||||
if(!this.doneStartup) {
|
if(!this.doneStartup) {
|
||||||
if(this.settings.get_boolean('fullscreen-auto')) {
|
this.doneStartup = true;
|
||||||
let root = player.widget.get_root();
|
|
||||||
if(root) {
|
|
||||||
let clapperWidget = root.get_child();
|
|
||||||
if(!clapperWidget.fullscreenMode)
|
|
||||||
root.fullscreen();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(this.settings.get_string('volume-initial') === 'custom')
|
if(this.settings.get_string('volume-initial') === 'custom')
|
||||||
this.set_volume(this.settings.get_int('volume-value') / 100);
|
this.set_volume(this.settings.get_int('volume-value') / 100);
|
||||||
}
|
if(this.settings.get_boolean('fullscreen-auto')) {
|
||||||
this.doneStartup = true;
|
let root = player.widget.get_root();
|
||||||
|
let clapperWidget = root.get_child();
|
||||||
|
if(!clapperWidget.fullscreenMode) {
|
||||||
|
this.playOnFullscreen = true;
|
||||||
|
root.fullscreen();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this.play();
|
this.play();
|
||||||
debug(`URI loaded: ${uri}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_onPlayerWarning(player, error)
|
_onPlayerWarning(player, error)
|
||||||
|
@@ -384,6 +384,10 @@ var Widget = GObject.registerClass({
|
|||||||
this.showControls(isFullscreen);
|
this.showControls(isFullscreen);
|
||||||
this.player.widget.grab_focus();
|
this.player.widget.grab_focus();
|
||||||
|
|
||||||
|
if(this.player.playOnFullscreen && isFullscreen) {
|
||||||
|
this.player.playOnFullscreen = false;
|
||||||
|
this.player.play();
|
||||||
|
}
|
||||||
this.emit('fullscreen-changed', isFullscreen);
|
this.emit('fullscreen-changed', isFullscreen);
|
||||||
debug(`interface in fullscreen mode: ${isFullscreen}`);
|
debug(`interface in fullscreen mode: ${isFullscreen}`);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user