Class: Video

html.Video

Class representing a video player component.

Subtitles in VTT format may be loaded from an external source and are emitted via the cues property.

new html.Video ()

Properties:
Name Type Description
cues Array.<string>

[readonly] The current set of subtitle cues.

currentTime number

The current time position in seconds.

duration number

[readonly] The duration of the video in seconds.

fitMode string

(default: "contain") The mode for fitting the original image into this element. One of: fill|contain|cover|scale-down|none

originalWidth number

[readonly] The original width of the image.

originalHeight number

[readonly] The original height of the image.

playing bool

[readonly] Whether the video is currently playing.

source string

(default: "") The video source URL.

status string

[readonly] The current status. One of: empty|loading|error|success

subtitles string

(default: "") The subtitles source URL. Subtitles must be in VTT format.

volume number

(default: 1.0) The current audio volume as a value between 0.0 and 1.0.

Extends

Methods

pause ()

Pauses playing the video.

play ()

Starts playing the video.