Package org.bluez
Interface MediaPlayer1
- All Superinterfaces:
org.freedesktop.dbus.interfaces.DBusInterface
public interface MediaPlayer1
extends org.freedesktop.dbus.interfaces.DBusInterface
File generated - 2023-02-20.
Based on bluez Documentation: media-api.txt.
Service: org.bluez (Controller role)
Interface: org.bluez.MediaPlayer1
Object path:
[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
Supported properties:
string Equalizer [readwrite]
Possible values: "off" or "on"
string Repeat [readwrite]
Possible values: "off", "singletrack", "alltracks" or
"group"
string Shuffle [readwrite]
Possible values: "off", "alltracks" or "group"
string Scan [readwrite]
Possible values: "off", "alltracks" or "group"
string Status [readonly]
Possible status: "playing", "stopped", "paused",
"forward-seek", "reverse-seek"
or "error"
uint32 Position [readonly]
Playback position in milliseconds. Changing the
position may generate additional events that will be
sent to the remote device. When position is 0 it means
the track is starting and when it's greater than or
equal to track's duration the track has ended. Note
that even if duration is not available in metadata it's
possible to signal its end by setting position to the
maximum uint32 value.
dict Track [readonly]
Track metadata.
Possible values:
string Title:
Track title name
string Artist:
Track artist name
string Album:
Track album name
string Genre:
Track genre name
uint32 NumberOfTracks:
Number of tracks in total
uint32 TrackNumber:
Track number
uint32 Duration:
Track duration in milliseconds
object Device [readonly]
Device object path.
string Name [readonly]
Player name
string Type [readonly]
Player type
Possible values:
"Audio"
"Video"
"Audio Broadcasting"
"Video Broadcasting"
string Subtype [readonly]
Player subtype
Possible values:
"Audio Book"
"Podcast"
boolean Browsable [readonly]
If present indicates the player can be browsed using
MediaFolder interface.
Possible values:
True: Supported and active
False: Supported but inactive
Note: If supported but inactive clients can enable it
by using MediaFolder interface but it might interfere
in the playback of other players.
boolean Searchable [readonly]
If present indicates the player can be searched using
MediaFolder interface.
Possible values:
True: Supported and active
False: Supported but inactive
Note: If supported but inactive clients can enable it
by using MediaFolder interface but it might interfere
in the playback of other players.
object Playlist
Playlist object path.
Based on bluez Documentation: media-api.txt.
Service: org.bluez (Controller role)
Interface: org.bluez.MediaPlayer1
Object path:
[variable prefix]/{hci0,hci1,...}/dev_XX_XX_XX_XX_XX_XX/playerX
Supported properties:
string Equalizer [readwrite]
Possible values: "off" or "on"
string Repeat [readwrite]
Possible values: "off", "singletrack", "alltracks" or
"group"
string Shuffle [readwrite]
Possible values: "off", "alltracks" or "group"
string Scan [readwrite]
Possible values: "off", "alltracks" or "group"
string Status [readonly]
Possible status: "playing", "stopped", "paused",
"forward-seek", "reverse-seek"
or "error"
uint32 Position [readonly]
Playback position in milliseconds. Changing the
position may generate additional events that will be
sent to the remote device. When position is 0 it means
the track is starting and when it's greater than or
equal to track's duration the track has ended. Note
that even if duration is not available in metadata it's
possible to signal its end by setting position to the
maximum uint32 value.
dict Track [readonly]
Track metadata.
Possible values:
string Title:
Track title name
string Artist:
Track artist name
string Album:
Track album name
string Genre:
Track genre name
uint32 NumberOfTracks:
Number of tracks in total
uint32 TrackNumber:
Track number
uint32 Duration:
Track duration in milliseconds
object Device [readonly]
Device object path.
string Name [readonly]
Player name
string Type [readonly]
Player type
Possible values:
"Audio"
"Video"
"Audio Broadcasting"
"Video Broadcasting"
string Subtype [readonly]
Player subtype
Possible values:
"Audio Book"
"Podcast"
boolean Browsable [readonly]
If present indicates the player can be browsed using
MediaFolder interface.
Possible values:
True: Supported and active
False: Supported but inactive
Note: If supported but inactive clients can enable it
by using MediaFolder interface but it might interfere
in the playback of other players.
boolean Searchable [readonly]
If present indicates the player can be searched using
MediaFolder interface.
Possible values:
True: Supported and active
False: Supported but inactive
Note: If supported but inactive clients can enable it
by using MediaFolder interface but it might interfere
in the playback of other players.
object Playlist
Playlist object path.
-
Method Summary
Modifier and TypeMethodDescriptionvoidFrom bluez documentation:
Fast forward playback, this action is only stopped
when another method in this interface is called.
voidHold(byte _avc_key) From bluez documentation:
Press and hold a specific key to send as passthrough
command.voidNext()From bluez documentation:
Next item.
voidPause()From bluez documentation:
Pause playback.
voidPlay()From bluez documentation:
Resume playback.
voidPress(byte _avc_key) From bluez documentation:
Press a specific key to send as passthrough command.
The key will be released automatically.voidPrevious()From bluez documentation:
Previous item.
voidRelease()From bluez documentation:
Release the previously held key invoked using Hold().
voidRewind()From bluez documentation:
Rewind playback, this action is only stopped
when another method in this interface is called.
voidStop()From bluez documentation:
Stop playback.
Methods inherited from interface org.freedesktop.dbus.interfaces.DBusInterface
getObjectPath, isRemote
-
Method Details
-
Play
From bluez documentation:
Resume playback.
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Pause
From bluez documentation:
Pause playback.
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Stop
From bluez documentation:
Stop playback.
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Next
From bluez documentation:
Next item.
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Previous
From bluez documentation:
Previous item.
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
FastForward
From bluez documentation:
Fast forward playback, this action is only stopped
when another method in this interface is called.
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Rewind
From bluez documentation:
Rewind playback, this action is only stopped
when another method in this interface is called.
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Press
void Press(byte _avc_key) throws BluezInvalidArgumentsException, BluezNotSupportedException, BluezFailedException From bluez documentation:
Press a specific key to send as passthrough command.
The key will be released automatically. Use Hold()
instead if the intention is to hold down the key.
- Parameters:
_avc_key- avc_key- Throws:
BluezInvalidArgumentsException- when argument is invalidBluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Hold
void Hold(byte _avc_key) throws BluezInvalidArgumentsException, BluezNotSupportedException, BluezFailedException From bluez documentation:
Press and hold a specific key to send as passthrough
command. It is your responsibility to make sure that
Release() is called after calling this method. The held
key will also be released when any other method in this
interface is called.
- Parameters:
_avc_key- avc_key- Throws:
BluezInvalidArgumentsException- when argument is invalidBluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-
Release
From bluez documentation:
Release the previously held key invoked using Hold().
- Throws:
BluezNotSupportedException- when operation not supportedBluezFailedException- on failure
-