Skip to content

Video

marimo.video

video(
    src: str | bytes | BytesIO | BufferedReader,
    controls: bool = True,
    muted: bool = False,
    autoplay: bool = False,
    loop: bool = False,
    width: int | str | None = None,
    height: int | str | None = None,
    rounded: bool = False,
) -> Html

Render an video as HTML.

Example
mo.video(
    src="https://v3.cdnpk.net/videvo_files/video/free/2013-08/large_watermarked/hd0992_preview.mp4",
    controls=False,
)
PARAMETER DESCRIPTION
src

the URL of the video or a file-like object

TYPE: str | bytes | BytesIO | BufferedReader

controls

whether to show the controls

TYPE: bool DEFAULT: True

muted

whether to mute the video

TYPE: bool DEFAULT: False

autoplay

whether to autoplay the video. the video will only autoplay if muted is True

TYPE: bool DEFAULT: False

loop

whether to loop the video

TYPE: bool DEFAULT: False

width

the width of the video in pixels or a string with units

TYPE: int | str | None DEFAULT: None

height

the height of the video in pixels or a string with units

TYPE: int | str | None DEFAULT: None

rounded

whether to round the corners of the video

TYPE: bool DEFAULT: False

RETURNS DESCRIPTION
Html

Html object