pub enum PlayerCommand {
Play,
Pause,
Stop,
Seek(Duration),
SetRate(f64),
SetAvOffset(i64),
UpdateLayout(Box<Timeline>),
}Expand description
Commands sent from PlayerHandle to PlayerRunner via a
bounded sync channel (capacity 64).
Variants§
Play
Resume playback (clear the paused flag).
Pause
Pause playback.
Stop
Stop the presentation loop; PlayerRunner::run returns after the
current frame.
Seek(Duration)
Seek to pts. Consecutive seeks are coalesced — only the last one
executes.
SetRate(f64)
Set the playback rate. Values ≤ 0.0 are ignored.
SetAvOffset(i64)
Set the A/V offset in milliseconds. Clamped to ±5 000 ms.
UpdateLayout(Box<Timeline>)
Replace the timeline clip layout without stopping playback.
Handled only by TimelineRunner; PlayerRunner ignores it.
The runner updates its internal ClipState / AudioOnlyTrack positions
in place and seeks to the last known media PTS so the next frame is
spatially correct after the layout change.
Auto Trait Implementations§
impl Freeze for PlayerCommand
impl RefUnwindSafe for PlayerCommand
impl Send for PlayerCommand
impl Sync for PlayerCommand
impl Unpin for PlayerCommand
impl UnsafeUnpin for PlayerCommand
impl UnwindSafe for PlayerCommand
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