Public Member Functions | |
def | __init__ (self, bus) |
def | available_backends (self) |
def | is_playing (self) |
def | next (self) |
def | pause (self) |
def | play (self, tracks=None, utterance=None, repeat=None) |
def | prev (self) |
def | queue (self, tracks=None) |
def | resume (self) |
def | seek (self, seconds=1) |
def | seek_backward (self, seconds=1) |
def | seek_forward (self, seconds=1) |
def | stop (self) |
def | track_info (self) |
Public Attributes | |
bus | |
info | |
Private Member Functions | |
def | _track_info (self, message=None) |
AudioService class for interacting with the audio subsystem Arguments: bus: Mycroft messagebus connection
Definition at line 45 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.__init__ | ( | self, | |
bus | |||
) |
Definition at line 53 of file skills/audioservice.py.
|
private |
Handler for catching returning track info
Definition at line 59 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.available_backends | ( | self | ) |
Return available audio backends. Returns: dict with backend names as keys
Definition at line 171 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.is_playing | ( | self | ) |
Definition at line 182 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.next | ( | self | ) |
Change to next track.
Definition at line 108 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.pause | ( | self | ) |
Pause playback.
Definition at line 116 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.play | ( | self, | |
tracks = None , |
|||
utterance = None , |
|||
repeat = None |
|||
) |
Start playback. Args: tracks: track uri or list of track uri's Each track can be added as a tuple with (uri, mime) to give a hint of the mime type to the system utterance: forward utterance for further processing by the audio service. repeat: if the playback should be looped
Definition at line 80 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.prev | ( | self | ) |
Change to previous track.
Definition at line 112 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.queue | ( | self, | |
tracks = None |
|||
) |
Queue up a track to playing playlist. Args: tracks: track uri or list of track uri's
Definition at line 65 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.resume | ( | self | ) |
Resume paused playback.
Definition at line 120 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.seek | ( | self, | |
seconds = 1 |
|||
) |
seek X seconds Args: seconds (int): number of seconds to seek, if negative rewind
Definition at line 124 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.seek_backward | ( | self, | |
seconds = 1 |
|||
) |
rewind X seconds Args: seconds (int): number of seconds to rewind
Definition at line 146 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.seek_forward | ( | self, | |
seconds = 1 |
|||
) |
skip ahead X seconds Args: seconds (int): number of seconds to skip
Definition at line 136 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.stop | ( | self | ) |
Stop the track.
Definition at line 104 of file skills/audioservice.py.
def mycroft.skills.audioservice.AudioService.track_info | ( | self | ) |
Request information of current playing track. Returns: Dict with track info.
Definition at line 156 of file skills/audioservice.py.
mycroft.skills.audioservice.AudioService.bus |
Definition at line 54 of file skills/audioservice.py.
mycroft.skills.audioservice.AudioService.info |
Definition at line 57 of file skills/audioservice.py.