#[repr(C)]pub enum MediaControlKind {
SeekRelative = 0,
SeekAbsolute = 1,
OpenUri = 2,
SetVolume = 3,
}Expand description
Holds the current session state and remembers whether the platform has been told about it.
Mirrors crate::haptics::HapticManager: the callback thread writes, the
shell drains once per pass. The difference is that this is a LATEST-WINS
value rather than a queue - a media widget wants the current track, not
every track the app has ever played.
What a control request from the platform’s media controls asks for
(9h-i-a-i-a, 9h-i-a-i-b): everything a transport KEY cannot carry.
Variants§
SeekRelative = 0
Move by position_us RELATIVE to the current position (MPRIS Seek;
negative moves back). The app clamps to the track.
SeekAbsolute = 1
Jump to the ABSOLUTE position_us (MPRIS SetPosition, SMTC’s
position change, MPChangePlaybackPositionCommand, onSeekTo).
OpenUri = 2
Open and play uri (MPRIS OpenUri). position_us is 0.
SetVolume = 3
Set the app’s output volume to volume (MPRIS Volume written;
0.0 silent, 1.0 full, above 1.0 is amplification a client may
ask for and the app may clamp). The app applies it and publishes the
result in NowPlayingInfo::volume.
Trait Implementations§
Source§impl Clone for MediaControlKind
impl Clone for MediaControlKind
Source§fn clone(&self) -> MediaControlKind
fn clone(&self) -> MediaControlKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more