bencher.results.video_controls

Classes

VideoControls

Module Contents

class bencher.results.video_controls.VideoControls
vid_p: list[bencher.optional_deps.pn.pane.Video] = []
loop_enabled: bool = True
video_container(path: str | pathlib.Path | None, **kwargs: Any) → bencher.optional_deps.pn.pane.Video | bencher.optional_deps.pn.pane.Markdown
play_videos(_event: param.parameterized.Event | None = None) → None

Unpause every registered video.

pause_videos(_event: param.parameterized.Event | None = None) → None

Pause every registered video.

toggle_looping(_event: param.parameterized.Event | None = None) → None

Flip looping on/off for every registered video, together.

Videos start looping (video_container()), so the first press turns looping off — hence the button reads “Toggle Looping” rather than “Loop Videos”, which would have described the opposite of what a first click does.

reset_videos(_event: param.parameterized.Event | None = None) → None

Request a rewind to the start of every registered video, and play it.

Unpausing is reliable. The rewind is a request: panel’s client-side Video model (panel/models/video.ts) arms a _blocked flag on every throttled ontimeupdate and its set_time handler clears that flag and returns without seeking, so a time write that lands while the video is playing can be swallowed in the browser. Bokeh also only transmits changed properties, so writing 0 over an existing 0 sends nothing. The python-side state below is always updated.

video_controls() → bencher.optional_deps.pn.Column