pub struct Mpris { /* private fields */ }Expand description
The media players, from cx.mpris(). A clone is cheap and shares the
one connection.
Implementations§
Source§impl Mpris
impl Mpris
Sourcepub fn players(&self) -> ReadSignal<Vec<Player>>
pub fn players(&self) -> ReadSignal<Vec<Player>>
Every player, in the order they appeared on the bus. Empty while there is no session bus. A player shows once it is read.
Sourcepub fn play_pause(&self, id: &str)
pub fn play_pause(&self, id: &str)
Tells player id to play if it is paused, and to pause if it
plays. A refusal or an unknown id is logged, as for every method
here.
Sourcepub fn seek(&self, id: &str, seconds: f64)
pub fn seek(&self, id: &str, seconds: f64)
Moves player id seconds on from where it is, or back for a
negative number. One that isn’t finite isn’t sent.
Sourcepub fn set_position(&self, id: &str, position: Duration)
pub fn set_position(&self, id: &str, position: Duration)
Moves player id to position in its track. A player that names
no track can’t be moved this way, which is logged.
Sourcepub fn set_volume(&self, id: &str, volume: f64)
pub fn set_volume(&self, id: &str, volume: f64)
Sets player id’s volume, 1.0 for full. One that isn’t finite
isn’t sent.
Sourcepub fn set_shuffle(&self, id: &str, shuffle: bool)
pub fn set_shuffle(&self, id: &str, shuffle: bool)
Turns player id’s shuffle on or off.
Sourcepub fn set_loop(&self, id: &str, status: LoopStatus)
pub fn set_loop(&self, id: &str, status: LoopStatus)
Sets what player id does at the end.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Mpris
impl !Send for Mpris
impl !Sync for Mpris
impl !UnwindSafe for Mpris
impl Forget for Mpris
impl Freeze for Mpris
impl Move for Mpris
impl Unpin for Mpris
impl UnsafeUnpin for Mpris
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more