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§
Sourcefn on_queue_changed(&self, queue: Value) -> MoosyncResult<()>
fn on_queue_changed(&self, queue: Value) -> MoosyncResult<()>
Called when the queue is changed.
Sourcefn on_volume_changed(&self) -> MoosyncResult<()>
fn on_volume_changed(&self) -> MoosyncResult<()>
Called when the volume is changed.
Sourcefn on_player_state_changed(&self) -> MoosyncResult<()>
fn on_player_state_changed(&self) -> MoosyncResult<()>
Called when the player state is changed.
Sourcefn on_song_changed(&self) -> MoosyncResult<()>
fn on_song_changed(&self) -> MoosyncResult<()>
Called when the song is changed.
Sourcefn on_seeked(&self, time: f64) -> MoosyncResult<()>
fn on_seeked(&self, time: f64) -> MoosyncResult<()>
Called when the player is seeked to a specific time.