Enum souvlaki::MediaControlEvent
source · pub enum MediaControlEvent {
Show 13 variants
Play,
Pause,
Toggle,
Next,
Previous,
Stop,
Seek(SeekDirection),
SeekBy(SeekDirection, Duration),
SetPosition(MediaPosition),
SetVolume(f64),
OpenUri(String),
Raise,
Quit,
}
Expand description
Events sent by the OS media controls.
Variants§
Play
Pause
Toggle
Next
Previous
Stop
Seek(SeekDirection)
Seek forward or backward by an undetermined amount.
SeekBy(SeekDirection, Duration)
Seek forward or backward by a certain amount.
SetPosition(MediaPosition)
Set the position/progress of the currently playing media item.
SetVolume(f64)
Sets the volume. The value is intended to be from 0.0 to 1.0.
But other values are also accepted. It is up to the user to
set constraints on this value.
NOTE: If the volume event was received and correctly handled,
the user must call MediaControls::set_volume
. Note that
this must be done only with the MPRIS backend.
OpenUri(String)
Open the URI in the media player.
Raise
Bring the media player’s user interface to the front using any appropriate mechanism available.
Quit
Shut down the media player.
Trait Implementations§
source§impl Clone for MediaControlEvent
impl Clone for MediaControlEvent
source§fn clone(&self) -> MediaControlEvent
fn clone(&self) -> MediaControlEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MediaControlEvent
impl Debug for MediaControlEvent
source§impl PartialEq for MediaControlEvent
impl PartialEq for MediaControlEvent
source§fn eq(&self, other: &MediaControlEvent) -> bool
fn eq(&self, other: &MediaControlEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MediaControlEvent
Auto Trait Implementations§
impl RefUnwindSafe for MediaControlEvent
impl Send for MediaControlEvent
impl Sync for MediaControlEvent
impl Unpin for MediaControlEvent
impl UnwindSafe for MediaControlEvent
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