pub enum Event {
Show 14 variants
PlayerShutDown,
Paused,
Playing,
Stopped,
LoopingChanged(LoopStatus),
ShuffleToggled(bool),
VolumeChanged(f64),
PlaybackRateChanged(f64),
TrackChanged(Metadata),
Seeked {
position_in_us: u64,
},
TrackAdded(TrackID),
TrackRemoved(TrackID),
TrackMetadataChanged {
old_id: TrackID,
new_id: TrackID,
},
TrackListReplaced,
}Expand description
Represents a change in Player state.
Note that this does not include position changes (seeking in a track or normal progress of time for playing media).
Variants§
PlayerShutDown
Player was shut down / quit.
Paused
Player was paused.
Playing
Player started playing media.
Stopped
Player was stopped.
LoopingChanged(LoopStatus)
Loop status of Player was changed. New LoopStatus is provided.
ShuffleToggled(bool)
Shuffle status of Player was changed. New shuffle status is provided.
VolumeChanged(f64)
Player’s volume was changed. The new volume is provided.
PlaybackRateChanged(f64)
Player’s playback rate was changed. New playback rate is provided.
TrackChanged(Metadata)
Seeked
Player seeked (changed position in the current track).
This will only be emitted when the player in question emits this signal. Some players do not support this signal. If you want to accurately detect seeking, you’ll have to query the player’s position yourself at some intervals.
TrackAdded(TrackID)
A new track was added to the TrackList.
TrackRemoved(TrackID)
A track was removed from the TrackList.
TrackMetadataChanged
A track on the TrackList had its metadata changed.
This could also mean that a entry on the playlist completely changed; including the ID.
Fields
TrackListReplaced
The track list was replaced.