Playback State
app.domain.video.playback_statePlayback view_state management — frame position and playback status.
See Also
SessionState— aggregates playback with session settingsDirection— represents frame-navigation direction
Layer: Domain. Context: Defines application concepts independently of UI and infrastructure implementations.
PlaybackState
dataclass
Tracks the current playback view_state of a video session.
| ATTRIBUTE | DESCRIPTION |
|---|---|
_current_frame_index |
Currently displayed frame as a 0-based index.
TYPE:
|
_is_playing |
Whether the video is actively playing.
TYPE:
|
Note
Uses property accessors with private backing fields while still keeping a lightweight slotted dataclass layout. Instances start at frame 0 with playback paused, then update as the user plays, pauses, or seeks. Supports tracking the visible frame, controlling playback, updating UI progress indicators, and synchronizing buffered data with user position.
Layer: Domain. Context: Represents application concepts without UI or infrastructure dependencies.
current_frame_index: int
property
writable
Return the zero-based frame index stored in this state.
| RETURNS | DESCRIPTION |
|---|---|
int
|
Current playback frame index. |
is_playing: bool
property
writable
Return whether playback is active.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
|
__init__(_current_frame_index: int = 0, _is_playing: bool = False) -> None
stop_playback() -> None
Stop playback.