Content
Video Player
A video player component that can play various video formats.
Use your app’s static folder to serve videos directly. For example, static/my_video.mp4
.
Alternatively, you can pack bytes or files in state:
state["vid_b"] = wf.pack_bytes(vid_bytes, "video/mp4")
state["vid_f"] = wf.pack_file(vid_file, "video/mp4")
Afterwards, you can reference the video using the syntax @{vid_f}
.
Fields
Name | Type | Description | Options |
---|---|---|---|
Source | Text | The URL of the video file. Alternatively, you can pass a file via state. | |
Controls | Text | Display video player controls. |
|
Autoplay | Text | Autoplay the video when the component is loaded. |
|
Loop | Text | Loop the video when it reaches the end. |
|
Muted | Text | Mute the video by default. |
|
Custom CSS classes | Text | CSS classes, separated by spaces. You can define classes in custom stylesheets. |
Low code usage
This component can be declared directly in Python, using backend-driven UI.