Skip to main content

MediaSession

Trait MediaSession 

Source
pub trait MediaSession {
    // Required methods
    fn command(&mut self, command: MediaCommand);
    fn set_volume(&mut self, volume: f64);
    fn sample(&mut self, now: Instant) -> MediaState;
    fn active(&self) -> bool;

    // Provided methods
    fn configure(&mut self, _options: &MediaOptions) { ... }
    fn poll_interval(&self) -> Duration { ... }
}

Required Methods§

Source

fn command(&mut self, command: MediaCommand)

Source

fn set_volume(&mut self, volume: f64)

Source

fn sample(&mut self, now: Instant) -> MediaState

Source

fn active(&self) -> bool

Provided Methods§

Source

fn configure(&mut self, _options: &MediaOptions)

Source

fn poll_interval(&self) -> Duration

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§