pub enum PlaybackEvent {
Play {
timestamp_ms: i64,
},
Pause {
timestamp_ms: i64,
position_ms: u64,
},
Seek {
from_ms: u64,
to_ms: u64,
},
BufferStart {
position_ms: u64,
},
BufferEnd {
position_ms: u64,
duration_ms: u32,
},
QualityChange {
from_height: u32,
to_height: u32,
bitrate: u32,
},
End {
position_ms: u64,
watch_duration_ms: u64,
},
}Expand description
A discrete event emitted during media playback.
Variants§
Play
The viewer pressed play.
Pause
The viewer paused at a given content position.
Seek
The viewer scrubbed from one position to another.
BufferStart
Buffering started at a content position.
BufferEnd
Buffering ended; duration_ms is how long the stall lasted.
QualityChange
The player switched quality levels.
End
Playback reached the end (or the user closed the player).
Trait Implementations§
Source§impl Clone for PlaybackEvent
impl Clone for PlaybackEvent
Source§fn clone(&self) -> PlaybackEvent
fn clone(&self) -> PlaybackEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlaybackEvent
impl Debug for PlaybackEvent
Source§impl PartialEq for PlaybackEvent
impl PartialEq for PlaybackEvent
Source§fn eq(&self, other: &PlaybackEvent) -> bool
fn eq(&self, other: &PlaybackEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PlaybackEvent
Auto Trait Implementations§
impl Freeze for PlaybackEvent
impl RefUnwindSafe for PlaybackEvent
impl Send for PlaybackEvent
impl Sync for PlaybackEvent
impl Unpin for PlaybackEvent
impl UnsafeUnpin for PlaybackEvent
impl UnwindSafe for PlaybackEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more