pub struct Player {Show 21 fields
pub id: String,
pub identity: String,
pub desktop_entry: String,
pub status: PlaybackStatus,
pub title: String,
pub artists: Vec<String>,
pub album: String,
pub art_url: String,
pub length: Option<Duration>,
pub can_play: bool,
pub can_pause: bool,
pub can_go_next: bool,
pub can_go_previous: bool,
pub can_seek: bool,
pub can_control: bool,
pub volume: Option<f64>,
pub shuffle: Option<bool>,
pub loop_status: Option<LoopStatus>,
pub rate: f64,
pub position: Duration,
pub position_known_at: Instant,
}Expand description
A media player and its track, as MPRIS describes them. Text is cut to 4 KiB.
Fields§
§id: StringIts bus name, such as org.mpris.MediaPlayer2.vlc, unique while it
runs. The key to give children_keyed, and what
Mpris::play_pause and the rest take.
identity: StringIts name for people, such as VLC media player.
desktop_entry: StringIts desktop file’s name without .desktop, such as vlc, or "".
status: PlaybackStatusWhether it plays.
title: StringThe track’s title, or "".
artists: Vec<String>The track’s artists, at most 32.
album: StringThe track’s album, or "".
art_url: StringWhere the track’s cover art is, such as a file:// URL, or "".
length: Option<Duration>How long the track is, if the player says.
can_play: boolWhether Mpris::play would do anything.
can_pause: boolWhether Mpris::pause would do anything.
can_go_next: boolWhether Mpris::next would do anything.
can_go_previous: boolWhether Mpris::previous would do anything.
can_seek: boolWhether Mpris::seek and Mpris::set_position would do
anything.
can_control: boolWhether it can be controlled at all.
volume: Option<f64>Its volume, 1.0 for full, if it has one.
shuffle: Option<bool>Whether it shuffles, if it can.
loop_status: Option<LoopStatus>What it does at the end, if it can loop.
rate: f64How fast it plays, 1.0 for normal speed.
position: DurationWhere playback was at position_known_at.
position_known_at: InstantWhen position was read.