PlayerEvents

Trait PlayerEvents 

Source
pub trait PlayerEvents {
    // Provided methods
    fn on_queue_changed(
        &self,
        req: SongQueueChangedRequest,
    ) -> MoosyncResult<()> { ... }
    fn on_volume_changed(&self, req: VolumeChangedRequest) -> MoosyncResult<()> { ... }
    fn on_player_state_changed(
        &self,
        req: PlayerStateChangedRequest,
    ) -> MoosyncResult<()> { ... }
    fn on_song_changed(&self, req: SongChangedRequest) -> MoosyncResult<()> { ... }
    fn on_seeked(&self, req: SeekedRequest) -> MoosyncResult<()> { ... }
}
Expand description

Trait for handling player-related events.

Provided Methods§

Source

fn on_queue_changed(&self, req: SongQueueChangedRequest) -> MoosyncResult<()>

Called when the queue is changed.

Source

fn on_volume_changed(&self, req: VolumeChangedRequest) -> MoosyncResult<()>

Called when the volume is changed.

Source

fn on_player_state_changed( &self, req: PlayerStateChangedRequest, ) -> MoosyncResult<()>

Called when the player state is changed.

Source

fn on_song_changed(&self, req: SongChangedRequest) -> MoosyncResult<()>

Called when the song is changed.

Source

fn on_seeked(&self, req: SeekedRequest) -> MoosyncResult<()>

Called when the player is seeked to a specific time.

Implementors§