hub.video

Play video clips on the hub’s screen.

Videos must be MJPEG .avi files that fit the 160x128 screen. Give the full path, for example "/sd/clip.avi".

Functions

is_finished() → bool

True when no video is playing.

play(path, *[, block]) → None

Play a video (without sound).

play_av(path, *[, block]) → None

Play a video with its sound.

stop() → None

Stop the video that is playing.

Module Contents

hub.video.is_finished() → bool[source]

True when no video is playing.

hub.video.play(path: str, *, block: bool = True) → None[source]

Play a video (without sound).

Normally waits until the video ends. With block=False it starts the video and your program continues right away — use is_finished() to check when it’s done.

hub.video.play_av(path: str, *, block: bool = True) → None[source]

Play a video with its sound.

On hubs without a speaker the video plays silently. With block=False your program continues right away.

hub.video.stop() → None[source]

Stop the video that is playing.