Trait MediaSessionFactory
pub trait MediaSessionFactory: Send + Sync {
// Required method
fn start(
&self,
config: MprisConfig,
initial: PlayerSnapshot,
) -> Option<MediaSession>;
}Expand description
Starts media-control sessions for players such as the VideoPlayer widget.
Required Methods§
fn start(
&self,
config: MprisConfig,
initial: PlayerSnapshot,
) -> Option<MediaSession>
fn start( &self, config: MprisConfig, initial: PlayerSnapshot, ) -> Option<MediaSession>
Register a player described by config, starting from initial.
None when the host has no media controls; the player then stays
inert.
Implementors§
impl MediaSessionFactory for DesktopMediaSessions
Available on non-Android only.