Clapper.Mpris

g Clapper.Feature Clapper.Feature Clapper.Mpris Clapper.Mpris Clapper.Feature->Clapper.Mpris GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Object->Clapper.Feature

Subclasses:

None

Methods

Inherited:

Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (own_name, identity, desktop_entry)

get_fallback_art_url ()

get_queue_controllable ()

set_fallback_art_url (art_url)

set_queue_controllable (controllable)

Virtual Methods

Inherited:

Clapper.Feature (15), Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Name

Type

Flags

Short Description

desktop-entry

str

r/w/co/en

fallback-art-url

str

r/w/en

identity

str

r/w/co/en

own-name

str

r/w/co/en

queue-controllable

bool

r/w/en

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Class Details

class Clapper.Mpris(**kwargs)
Bases:

Clapper.Feature

Abstract:

No

Structure:

Clapper.MprisClass

An optional MPRIS feature to add to the player.

Not every OS supports MPRIS. Use [const`Clapper`.HAVE_MPRIS] macro to check if Clapper API was compiled with this feature.

classmethod new(own_name, identity, desktop_entry)
Parameters:
  • own_name (str) – an unique DBus name with “org.mpris.MediaPlayer2.” prefix

  • identity (str) – a media player friendly name

  • desktop_entry (str or None) – desktop file basename (without “.desktop” extension)

Returns:

a new Clapper.Mpris instance.

Return type:

Clapper.Mpris

Creates a new Clapper.Mpris instance.

get_fallback_art_url()
Returns:

fallback art URL.

Return type:

str or None

Get fallback art URL earlier set by user.

get_queue_controllable()
Returns:

True if control over Clapper.Queue is allowed, False otherwise.

Return type:

bool

Get whether remote MPRIS clients can control [class`Clapper`.Queue].

set_fallback_art_url(art_url)
Parameters:

art_url (str or None) – an art URL

Set fallback artwork to show when media does not provide one.

set_queue_controllable(controllable)
Parameters:

controllable (bool) – if Clapper.Queue should be controllable

Set whether remote MPRIS clients can control Clapper.Queue.

This includes ability to open new URIs, adding/removing items from the queue and selecting current item for playback remotely using MPRIS interface.

You probably want to keep this disabled if your application is supposed to manage what is played now and not MPRIS client.

Property Details

Clapper.Mpris.props.desktop_entry
Name:

desktop-entry

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

The basename of an installed .desktop file with the “.desktop” extension stripped.

Clapper.Mpris.props.fallback_art_url
Name:

fallback-art-url

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Fallback artwork to show when media does not provide one.

Clapper.Mpris.props.identity
Name:

identity

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

A friendly name to identify the media player.

Example: “My Player”

Clapper.Mpris.props.own_name
Name:

own-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY, EXPLICIT_NOTIFY

DBus name to own on connection.

Must be written as a reverse DNS format starting with “org.mpris.MediaPlayer2.” prefix. Each Clapper.Mpris instance running on the same system must have an unique name.

Example: “org.mpris.MediaPlayer2.MyPlayer.instance123”

Clapper.Mpris.props.queue_controllable
Name:

queue-controllable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Whether remote MPRIS clients can control Clapper.Queue.