Class

AstalMprisPlayer

Description

class AstalMpris.Player : GObject.Object
{
  /* No available fields */
}

Object which tracks players through their mpris dbus interface. The most simple way is to use AstalMprisMpris which tracks every player, but AstalMprisPlayer can be constructed for a dedicated players too.

Ancestors

Constructors

astal_mpris_player_new

Construct a Player that tracks a dbus name. For example “org.mpris.MediaPlayer2.spotify”. The “org.mpris.MediaPlayer2.” prefix can be leftout so simply “spotify” would mean the same. AstalMprisPlayer:available indicates whether the player is actually running or not.

Instance methods

astal_mpris_player_raise

Brings the player’s user interface to the front using any appropriate mechanism available. The media player may be unable to control how its user interface is displayed, or it may not have a graphical user interface at all. In this case, the AstalMprisPlayer:can-raise is false and this method does nothing.

astal_mpris_player_quit

Causes the media player to stop running. The media player may refuse to allow clients to shut it down. In this case, the AstalMprisPlayer:can-quit property is false and this method does nothing.

astal_mpris_player_toggle_fullscreen

Toggle AstalMprisPlayer:fullscreen state.

astal_mpris_player_next

Skips to the next track in the tracklist. If there is no next track (and endless playback and track repeat are both off), stop playback. If AstalMprisPlayer:can-go-next is false this method has no effect.

astal_mpris_player_previous

Skips to the previous track in the tracklist. If there is no previous track (and endless playback and track repeat are both off), stop playback. If AstalMprisPlayer:can-go-previous is false this method has no effect.

astal_mpris_player_pause

Pauses playback. If playback is already paused, this has no effect. If AstalMprisPlayer:can-pause is false this method has no effect.

astal_mpris_player_play_pause

Pauses playback. If playback is already paused, resumes playback. If playback is stopped, starts playback.

astal_mpris_player_stop

Stops playback. If playback is already stopped, this has no effect. If AstalMprisPlayer:can-control is false this method has no effect.

astal_mpris_player_play

Starts or resumes playback. If already playing, this has no effect. If paused, playback resumes from the current position. If [property@ AstalMpris.Player:can_play] is false this method has no effect.

astal_mpris_player_open_uri

Uri scheme should be an element of AstalMprisPlayer:supported-uri-schemes and the mime-type should match one of the elements of AstalMprisPlayer:supported-mime-types.

astal_mpris_player_loop

Change AstalMprisPlayer:loop-status from none to track, from track to playlist, from playlist to none.

astal_mpris_player_shuffle

Toggle AstalMprisPlayer:shuffle-status.

astal_mpris_player_get_meta

Lookup a key from AstalMprisPlayer:metadata. This method is useful for languages that fail to introspect hashtables.

astal_mpris_player_get_bus_name
No description available.

astal_mpris_player_get_available
No description available.

astal_mpris_player_get_can_quit
No description available.

astal_mpris_player_get_fullscreen
No description available.

astal_mpris_player_get_can_set_fullscreen
No description available.

astal_mpris_player_get_can_raise
No description available.

astal_mpris_player_get_identity
No description available.

astal_mpris_player_get_entry
No description available.

astal_mpris_player_get_loop_status
No description available.

astal_mpris_player_set_loop_status
No description available.

astal_mpris_player_get_rate
No description available.

astal_mpris_player_set_rate
No description available.

astal_mpris_player_get_shuffle_status
No description available.

astal_mpris_player_set_shuffle_status
No description available.

astal_mpris_player_get_volume
No description available.

astal_mpris_player_set_volume
No description available.

astal_mpris_player_get_position
No description available.

astal_mpris_player_set_position
No description available.

astal_mpris_player_get_playback_status
No description available.

astal_mpris_player_get_minimum_rate
No description available.

astal_mpris_player_get_maximum_rate
No description available.

astal_mpris_player_get_can_go_next
No description available.

astal_mpris_player_get_can_go_previous
No description available.

astal_mpris_player_get_can_play
No description available.

astal_mpris_player_get_can_pause
No description available.

astal_mpris_player_get_can_seek
No description available.

astal_mpris_player_get_can_control
No description available.

astal_mpris_player_get_metadata
No description available.

astal_mpris_player_get_trackid
No description available.

astal_mpris_player_get_length
No description available.

astal_mpris_player_get_art_url
No description available.

astal_mpris_player_get_album
No description available.

astal_mpris_player_get_album_artist
No description available.

astal_mpris_player_get_artist
No description available.

astal_mpris_player_get_lyrics
No description available.

astal_mpris_player_get_title
No description available.

astal_mpris_player_get_composer
No description available.

astal_mpris_player_get_comments
No description available.

astal_mpris_player_get_cover_art
No description available.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

AstalMpris.Player:bus-name

Full dbus namae of this player.

AstalMpris.Player:available

Indicates if AstalMprisPlayer:bus-name is available on dbus.

AstalMpris.Player:can-quit

Indicates if astal_mpris_player_quit() has any effect.

AstalMpris.Player:fullscreen

Indicates if the player is occupying the fullscreen. This is typically used for videos. Use astal_mpris_player_toggle_fullscreen() to toggle fullscreen state.

AstalMpris.Player:can-set-fullscreen

Indicates if astal_mpris_player_toggle_fullscreen() has any effect.

AstalMpris.Player:can-raise

Indicates if astal_mpris_player_raise() has any effect.

AstalMpris.Player:identity

A human friendly name to identify the player.

AstalMpris.Player:entry

The base name of a .desktop file.

AstalMpris.Player:supported-uri-schemes

The URI schemes supported by the media player. This can be viewed as protocols supported by the player in almost all cases. Almost every media player will include support for the “file ” scheme. Other common schemes are “http” and “rtsp”.

AstalMpris.Player:supported-mime-types

The mime-types supported by the player.

AstalMpris.Player:loop-status

The current loop/repeat status.

AstalMpris.Player:rate

The current playback rate.

AstalMpris.Player:shuffle-status

The current shuffle status.

AstalMpris.Player:volume

The current volume level between 0 and 1.

AstalMpris.Player:position

The current position of the track in seconds. To get a progress percentage simply divide this with AstalMprisPlayer:length.

AstalMpris.Player:playback-status

The current playback status.

AstalMpris.Player:minimum-rate

The minimum value which the AstalMprisPlayer:rate can take.

AstalMpris.Player:maximum-rate

The maximum value which the AstalMprisPlayer:rate can take.

AstalMpris.Player:can-go-next

Indicates if invoking astal_mpris_player_next() has effect.

AstalMpris.Player:can-go-previous

Indicates if invoking astal_mpris_player_previous() has effect.

AstalMpris.Player:can-play

Indicates if invoking astal_mpris_player_play() has effect.

AstalMpris.Player:can-pause

Indicates if invoking astal_mpris_player_pause() has effect.

AstalMpris.Player:can-seek

Indicates if setting AstalMprisPlayer:position has effect.

AstalMpris.Player:can-control

Indicates if the player can be controlled with methods such as astal_mpris_player_play_pause().

AstalMpris.Player:metadata

Metadata hashtable of this player. In languages that cannot introspect this use astal_mpris_player_get_meta().

AstalMpris.Player:trackid

Currently playing track’s id.

AstalMpris.Player:length

Length of the currently playing track in seconds.

AstalMpris.Player:art-url

The location of an image representing the track or album. You should always prefer to use AstalMprisPlayer:cover-art.

AstalMpris.Player:album

Title of the currently playing album.

AstalMpris.Player:album-artist

Artists of the currently playing album.

AstalMpris.Player:artist

Artists of the currently playing track.

AstalMpris.Player:lyrics

Lyrics of the currently playing track.

AstalMpris.Player:title

Title of the currently playing track.

AstalMpris.Player:composer

Composers of the currently playing track.

AstalMpris.Player:comments

Comments of the currently playing track.

AstalMpris.Player:cover-art

Path of the cached AstalMprisPlayer:art-url.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct AstalMprisPlayerClass {
  void (* player_appeared) (
    AstalMprisPlayer* self
  );
  void (* player_closed) (
    AstalMprisPlayer* self
  );
  
}

No description available.

Class members
appeared: void (* player_appeared) ( AstalMprisPlayer* self )

No description available.

closed: void (* player_closed) ( AstalMprisPlayer* self )

No description available.