Expand description
§mpris-async
Async version of the mpris crate.
Provides async versions of PlayerEvents, PlayerFinder,
and ProgressTracker.
§Get started
Easiest way to get started with mpris is using get_active_player and then using
events::PlayerEventsStream to track changes.
Modules§
- events
PlayerEventsStreamhandles when new player events are emitted by a given player. Alternatively, the class gives a reciever which can be used to track events.- fake_
progress - Used to make
crate::progress::ProgressStreampossible. The code is identical to mpris’s Progress. - player
PlayerStreamHandles player connections. It will try for a connection to a new mpris player forever.- progress
ProgressStreamhandles when changes to progress are sent.
Structs§
- Metadata
- A structured representation of the
Playermetadata. - Player
- A MPRIS-compatible player.
- Progress
- Struct containing information about current progress of a
Player. - TrackID
- Represents the MPRIS
Track_Idtype. - Track
List - Represents a
MediaPlayer2.TrackList.
Functions§
- get_
active_ player - Gets the most active player. If no player exists, this function will wait until one does.
Based of off
PlayerFinder::find_active - get_
first_ player - Gets the first player. If no player exists, this function will wait until one does.
Based of off
PlayerFinder::find_first - get_
players - Gets all of the avaliable players. If no player exists, this function will wait until one does.
Every
retry_delaymilliseconds it will try for a new connection. Based of offPlayerFinder::find_all - stream_
players - Creates a stream of Players. Unlike mpris::PlayerFinder::iter_players, this function will keep checking for more players forever.