Skip to main content
Render a video as HTML.

Usage

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

Signature

mo.video(
    src: Union[str, bytes, io.BytesIO, io.BufferedReader],
    controls: bool = True,
    muted: bool = False,
    autoplay: bool = False,
    loop: bool = False,
    width: Optional[Union[int, str]] = None,
    height: Optional[Union[int, str]] = None,
    rounded: bool = False
) -> Html

Parameters

src
Union[str, bytes, io.BytesIO, io.BufferedReader]
required
The URL of the video or a file-like object.
controls
bool
default:"True"
Whether to show the controls.
muted
bool
default:"False"
Whether to mute the video.
autoplay
bool
default:"False"
Whether to autoplay the video. The video will only autoplay if muted is True.
loop
bool
default:"False"
Whether to loop the video.
width
Optional[Union[int, str]]
default:"None"
The width of the video in pixels or a string with units.
height
Optional[Union[int, str]]
default:"None"
The height of the video in pixels or a string with units.
rounded
bool
default:"False"
Whether to round the corners of the video.

Returns

Html
An Html object.

Build docs developers (and LLMs) love