mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 23:32:04 +02:00
Add option to close player after playback
This commit is contained in:
@@ -345,12 +345,13 @@ class ClapperPlayer extends PlayerBase
|
||||
|
||||
_onStreamEnded(player)
|
||||
{
|
||||
debug('stream ended');
|
||||
this._trackId++;
|
||||
|
||||
if(this._trackId < this._playlist.length)
|
||||
this.set_media(this._playlist[this._trackId]);
|
||||
else
|
||||
this.stop();
|
||||
else if(settings.get_boolean('close-auto'))
|
||||
this._onCloseRequest(this.widget.get_root());
|
||||
}
|
||||
|
||||
_onUriLoaded(player, uri)
|
||||
|
@@ -13,6 +13,7 @@ class ClapperGeneralPage extends PrefsBase.Grid
|
||||
|
||||
this.addTitle('Startup');
|
||||
this.addCheckButton('Auto enter fullscreen', 'fullscreen-auto');
|
||||
this.addCheckButton('Close after playback', 'close-auto');
|
||||
|
||||
this.addTitle('Volume');
|
||||
let comboBox = this.addComboBoxText('Initial value', [
|
||||
|
@@ -405,7 +405,6 @@ var Widget = GObject.registerClass({
|
||||
player.disconnect(this.mediaInfoSignal);
|
||||
this.mediaInfoSignal = null;
|
||||
}
|
||||
this.controls.togglePlayButton.setPrimaryIcon();
|
||||
break;
|
||||
case GstPlayer.PlayerState.PAUSED:
|
||||
debug('player state changed to: PAUSED');
|
||||
|
@@ -6,6 +6,10 @@
|
||||
<default>false</default>
|
||||
<summary>Automatically enter fullscreen when first file is loaded</summary>
|
||||
</key>
|
||||
<key name="close-auto" type="b">
|
||||
<default>false</default>
|
||||
<summary>Automatically close the app after playback finishes</summary>
|
||||
</key>
|
||||
<key name="volume-initial" type="s">
|
||||
<default>"restore"</default>
|
||||
<summary>Mode used for startup volume value</summary>
|
||||
|
Reference in New Issue
Block a user