sublime_music.players.manager module

class sublime_music.players.manager.PlayerManager(on_timepos_change, on_track_end, on_player_event, player_device_change_callback, config)[source]

Bases: object

Parameters
__init__(on_timepos_change, on_track_end, on_player_event, player_device_change_callback, config)[source]
Parameters
available_player_types: List[Type] = [<class 'sublime_music.players.mpv.MPVPlayer'>, <class 'sublime_music.players.chromecast.ChromecastPlayer'>]
property can_start_playing_with_no_latency: bool
change_settings(config)[source]
Parameters

config (Dict[str, Dict[str, Union[Type, Tuple[str, ...]]]]) –

property current_device_id: Optional[str]
current_song: Optional[sublime_music.adapters.api_objects.Song]
device_id_type_map: Dict[str, Type]
static get_configuration_options()[source]
Returns

Dictionary of the name of the player -> option configs (see sublime_music.players.base.Player.get_configuration_options for details).

Return type

Dict[str, Dict[str, Union[Type, Tuple[str, …]]]]

get_is_muted()[source]
Return type

bool

get_volume()[source]
Return type

float

next_media_cached(uri, song)[source]
Parameters
next_song_uri: Optional[str]
pause()[source]
play_media(uri, progress, song)[source]
Parameters
players: Dict[Type, Any]
property playing: bool
refresh_players()[source]
reset()[source]
seek(position)[source]
Parameters

position (datetime.timedelta) –

set_current_device_id(device_id)[source]
Parameters

device_id (str) –

set_muted(muted)[source]
Parameters

muted (bool) –

set_volume(volume)[source]
Parameters

volume (float) –

shutdown()[source]
property song_loaded: bool
property supported_schemes: Set[str]
toggle_play()[source]