Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Properties
  • Signals
  • Detailed Description

MprisPlayer QML Type

Allows a media player to be remote controlled More...

Import Statement: import Amber.Mpris 1.0
  • List of all members, including inherited members

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

canControl : bool

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.


canGoNext : bool

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.


canGoPrevious : bool

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.


canPause : bool

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.


canPlay : bool

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.


canQuit : bool

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.


canRaise : bool

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.


canSeek : bool

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.


canSetFullscreen : bool

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.


desktopEntry : string

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.


fullscreen : bool

Indicates whether the player is in fullscreen mode

Should be set to true, if the player is currently in fullscreen mode. Defaults to false.


identity : string

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.


loopStatus : int

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.


maximumRate : double

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.


minimumRate : double

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.


playbackStatus : Mpris::PlaybackStatus

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.


position : int

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().


rate : double

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.


serviceName : string

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.


shuffle : bool

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.


supportedMimeTypes : list<string>

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.


supportedUriSchemes : list<string>

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.


volume : double

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

loopStatusRequested(int loopStatus)

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.


nextRequested()

This signal is emitted when there is an incoming request to move to the next item on the playlist.

See also MprisPlayer::canGoNext.


openUriRequested(url uri)

This signal is emitted when there is an incoming request to play media from specified location.

See also MprisPlayer::supportedUriSchemes and MprisPlayer::supportedMimeTypes.


pauseRequested()

This signal is emitted when there is an incoming request to pause current playback.

See also MprisPlayer::canPause.


playPauseRequested()

This signal is emitted when there is an incoming request to start, resume or pause current playback.

See also MprisPlayer::canPlay and MprisPlayer::canPause.


playRequested()

This signal is emitted when there is an incoming request to start or resume playback.

See also MprisPlayer::canPlay.


positionRequested()

When emitted, indicates that a remote controller wants to read the position property, and it should be updated.


previousRequested()

This signal is emitted when there is an incoming request to move to the previous item on the playlist.

See also MprisPlayer::canGoPrevious.


quitRequested()

This signal is emitted when there is an incoming request to close the application.


raiseRequested()

This signal is emitted when there is an incoming request to present the application to the user.


rateRequested(double rate)

This signal is emitted when there is an incoming request to change the playback rate.

See also MprisPlayer::rate, MprisPlayer::minimumRate, and MprisPlayer::maximumRate.


seekRequested(int offset)

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).


seeked(int position)

This signal should be emitted whenever there has been a non-linear change in the position withing the currently playing media.


setPositionRequested(string trackId, int position)

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.


shuffleRequested(bool shuffle)

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.


stopRequested()

This signal is emitted when there is an incoming request to stop current playback.


volumeRequested(double volume)

This signal is emitted when there is an incoming request to change the current playback volume.

See also MprisPlayer::volume.


  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn