API Reference
adafruit_ble_apple_media
Support for the Apple Media Service which provides media playback info and control.
Documented by Apple here: https://developer.apple.com/library/archive/documentation/CoreBluetooth/Reference/AppleMediaService_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40014716-CH2-SW1
- class adafruit_ble_apple_media.AppleMediaService(**kwargs)
View and control currently playing media.
Exact functionality varies with different media apps. For example, Spotify will include the album name and artist name in
titlewhen controlling playback on a remote device.artistincludes a description of the remote playback.- album
Current track’s album name.
- artist
Current track’s artist name.
- duration
Current track’s duration as a string.
- elapsed_time
Time elapsed in the current track. Not updated as the track plays. Use (the amount of time since read elapsed time) *
playback_rateto estimate the currentelapsed_time.
- fast_forwarding
True when playback is fast-forwarding. False otherwise.
- paused
True when playback is paused. False otherwise.
- playback_rate
Playback rate as a decimal of normal speed.
- player_name
Name of the media player app
- playing
True when playback is playing. False otherwise.
- queue_index
Current track’s index in the queue.
- queue_length
Count of tracks in the queue.
- repeat_mode
Current repeat mode as an integer. Off (0), One (1), and All (2)
- rewinding
True when playback is rewinding. False otherwise.
- shuffle_mode
Current shuffle mode as an integer. Off (0), One (1), and All (2)
- title
Current track’s title.
- volume
Current volume
- exception adafruit_ble_apple_media.UnsupportedCommand
Raised when the command isn’t available with current media player app.