moosync_edk::api

Trait PlayerEvents

Source
pub trait PlayerEvents {
    // Provided methods
    fn on_queue_changed(&self, queue: Value) -> MoosyncResult<()> { ... }
    fn on_volume_changed(&self) -> MoosyncResult<()> { ... }
    fn on_player_state_changed(&self) -> MoosyncResult<()> { ... }
    fn on_song_changed(&self) -> MoosyncResult<()> { ... }
    fn on_seeked(&self, time: f64) -> MoosyncResult<()> { ... }
}
Expand description

Trait for handling player-related events.

Provided Methods§

Source

fn on_queue_changed(&self, queue: Value) -> MoosyncResult<()>

Called when the queue is changed.

Source

fn on_volume_changed(&self) -> MoosyncResult<()>

Called when the volume is changed.

Source

fn on_player_state_changed(&self) -> MoosyncResult<()>

Called when the player state is changed.

Source

fn on_song_changed(&self) -> MoosyncResult<()>

Called when the song is changed.

Source

fn on_seeked(&self, time: f64) -> MoosyncResult<()>

Called when the player is seeked to a specific time.

Implementors§