API Documentation
Documentation for developing SailfishOS applicationsMprisPlayer QML Type
Allows a media player to be remote controlled More...
Import Statement: | import Amber.Mpris 1.0 |
Properties
- canControl : bool
- canGoNext : bool
- canGoPrevious : bool
- canPause : bool
- canPlay : bool
- canQuit : bool
- canRaise : bool
- canSeek : bool
- canSetFullscreen : bool
- desktopEntry : string
- fullscreen : bool
- identity : string
- loopStatus : int
- maximumRate : double
- metaData : MprisMetaData
- minimumRate : double
- playbackStatus : Mpris::PlaybackStatus
- position : int
- rate : double
- serviceName : string
- shuffle : bool
- supportedMimeTypes : list<string>
- supportedUriSchemes : list<string>
- volume : double
Signals
- loopStatusRequested(int loopStatus)
- nextRequested()
- openUriRequested(url uri)
- pauseRequested()
- playPauseRequested()
- playRequested()
- positionRequested()
- previousRequested()
- quitRequested()
- raiseRequested()
- rateRequested(double rate)
- seekRequested(int offset)
- seeked(int position)
- setPositionRequested(string trackId, int position)
- shuffleRequested(bool shuffle)
- stopRequested()
- volumeRequested(double volume)
Detailed Description
Enables the possibility to receive remote control commands over MPRIS interface.
All property changes are slightly delayed and bundled together for performance reasons.
The serviceName property must be set for any functionality.
Property Documentation
Indicates whether the player can be controlled remotely
Should be set to true if the player can receive any remote control commands. This should not change value during the lifetime of the player.
Defaults to false.
Indicates whether the player can jump to next item
Should be set to true if the player has a next item to play, normally if there are more items on the playlist, or repeat is enabled.
Defaults to false.
Indicates whether the player can jump the previous item
Should be set to true if the player has a next item to play, normally if there are previous items on the playlist, or repeat is enabled.
Defaults to false.
Indicates whether the player can be paused
Should be set to true if the player is in a state that it can be paused. If set to true, remote controllers can emit the pauseRequested and playPauseRequested signals.
Defaults to false.
Indicates whether the player can be started
Should be set to true if the player is in a state that it can be started or resumed. If set to true, remote controllers can emit the playRequested and playPauseRequested signals.
Defaults to false.
Sets indication whether the player can be told to quit remotely
When set to true, a remote controller can emit the quitRequested signal. Defaults to false.
See also MprisPlayer::quitRequested.
Sets indication whether the player can be told to present itself
When set to true, a remote controller can emit the raiseRequested signal. Defaults to false.
Indicates whether the player can seek in the current media
Should be set to true if the current media in the player can be seeked. If set to true, remote controllers can emit the seekRequested and setPositionRequested signals.
Defaults to false.
Sets indication whether the player can be told to go full screen
When set to true, a remote controlelr can emit the fullScreenRequested signal. Defaults to false.
Sets the name of the desktop file that identifies the player
Can be set to the base name of a desktop entry of the player, allowing remote controllers to gain information about the player (icon, localized name).
Empty by default.
Indicates whether the player is in fullscreen mode
Should be set to true, if the player is currently in fullscreen mode. Defaults to false.
Indicates the name of the player
Should be set to a human-readable name of the player, normally should match a name found in desktopEntry.
Empty by default.
Indicates the current looping mode of the player
Should be set to either Mpris.LoopNone, Mpris.LoopTrack or Mpris.LoopTrackList to indicate the current looping mode of the player.
Defaults to Mpris.LoopNone.
Indicates the maximum playback rate of the player
Should be set to indicate the fastest playback speed the player can use.
Defaults to 1.0.
metaData : MprisMetaData |
An MprisMetaData object for the current media
The properties of the returned object should be filled with details about the current media in the player.
Indicates the minimum playback rate of the player
Should be set to indicate the slowest playback speed the player can use.
Defaults to 1.0.
Indicates the current status of the player
Should be set to Mpris.Stopped, Mpris.Playing or Mpris.Paused to indicate the current state of the player.
Indicates the position in current item in milliseconds
Should be set to the current playback position in the current media, in milliseconds.
For more accurate timing, this should be set in a positionRequested signal handler, property binding may lead to inaccurate time being reported.
Defaults to 0.
See also MprisPlayer::positionRequested().
Indicates the current playback rate of the player
Should be set to a real number that indicates current relative playback speed.
Defaults to 1.0.
Sets the name under which the player is registered
This property must be set to receive or publish anything. Must be a valid D-Bus service name part.
The actual name on D-Bus will be prepended with "org.mpris.MediaPlayer2.", and appended with the current process id.
Indicates whether the playlist is played in random order
Should be set to true if the current playlist is being played in random order.
Defaults to false.
Indicates the mime types the player supports
Should be set to a list of mime types the player is able to play. Common examples are "audio/mpeg" and "application/ogg". Note, this is not enforced, and remote controllers can still request opening uris of other types.
Empty by default.
Indicates the procotols the player supports
Should be set to a list of protocol schemes the player supports. Common examples are "file" and "http". Note, this is not enforced, and remote controllers can still request opening uris with other schemes.
Empty by default.
Indicates the current playing volume of the player
Should be set to current relative playing volume used by the player.
Defaults to 1.0.
Signal Documentation
This signal is emitted when there is an incoming request to change the way the current media playlist is to be repeated.
See also MprisPlayer::loopStatus.
This signal is emitted when there is an incoming request to move to the next item on the playlist.
See also MprisPlayer::canGoNext.
This signal is emitted when there is an incoming request to play media from specified location.
See also MprisPlayer::supportedUriSchemes and MprisPlayer::supportedMimeTypes.
This signal is emitted when there is an incoming request to pause current playback.
See also MprisPlayer::canPause.
This signal is emitted when there is an incoming request to start, resume or pause current playback.
See also MprisPlayer::canPlay and MprisPlayer::canPause.
This signal is emitted when there is an incoming request to start or resume playback.
See also MprisPlayer::canPlay.
When emitted, indicates that a remote controller wants to read the position property, and it should be updated.
This signal is emitted when there is an incoming request to move to the previous item on the playlist.
See also MprisPlayer::canGoPrevious.
This signal is emitted when there is an incoming request to present the application to the user.
This signal is emitted when there is an incoming request to change the playback rate.
See also MprisPlayer::rate, MprisPlayer::minimumRate, and MprisPlayer::maximumRate.
This signal is emitted when there is an incoming request to change the position within the currently playing media. The offset should be interpreted as an millisecond offset from the current playing position.
See also MprisPlayer::position and MprisPlayer::seeked(int position).
This signal should be emitted whenever there has been a non-linear change in the position withing the currently playing media.
This signal is emitted when there is an incoming request to move to a certain millisecond position in the currently playing media.
If trackId does not match the identifier of the currently playing track, the request should be ignored.
This signal is emitted when there is an incoming request to change whether the current media playlist should be played in random order.
See also MprisPlayer::shuffle.
This signal is emitted when there is an incoming request to change the current playback volume.
See also MprisPlayer::volume.