Skip to content

Commit

Permalink
docs(PlayerAction): Document Seek & TimeChanged actions
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed May 28, 2024
1 parent 05793f3 commit c7bbf30
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/runtime/msg/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,22 @@ pub enum ActionPlayer {
state: StreamItemState,
},
/// Seek performed by the user when using the seekbar or
/// the shortcuts for seeking
/// the shortcuts for seeking.
///
/// When transitioning from Seek to TimeChanged and vice-versa
/// we need to make sure to update the other accordingly
/// if we have any type of throttling of these events,
/// otherwise we will get wrong `LibraryItem.state.time_offset`!
Seek {
time: u64,
duration: u64,
device: String,
},
/// A normal playback by the video player
///
/// The time from one TimeChanged action to another can only grow (move forward)
/// and should never go backwards, except when a [`ActionPlayer::Seek`] happen
/// and moves the time backwards.
TimeChanged {
time: u64,
duration: u64,
Expand Down

0 comments on commit c7bbf30

Please sign in to comment.