Providers
Video
This provider enables playing video files via the HTML5 video element.
The video provider is used to embed video content into documents via the native
<video>
element.
Refer to the Player component if you’re looking for props, methods, and events.
Sources
Section titled SourcesSingle Source
Source Sizes
Sources Types
Source Object
The src property on the player accepts any of the following source objects: MediaStream
,
MediaSource
, Blob
, and File
. You can optionally specify it’s a video object by setting the
source type
to video/object
.
Source Types
Section titled Source TypesThe video source URL should include on the following file extensions: mp4, ogg, ogv, webm, mov, m4v.
If the source URL does not contain a file extension, you must provide one of the following type hints: video/mp4, video/webm, video/3gp, video/ogg, video/avi, video/mpeg.
The following are valid as they have a file extension (e.g, .mp4) or type hint (e.g., video/mp4):
src="https://example.com/video.mp4"
src = { src: "https://example.com/video", type: "video/mp4" }
Element
Section titled ElementYou can obtain a reference to the underlying HTMLVideoElement
element like so:
Event Target
Section titled Event TargetThe HTMLVideoElement
can also be referenced on all media events like so: