There are a number of standard video functions that return information or cause an action on video file or player.
The following table lists the commonly used video functions.
Function | Parameter | Return | Description |
---|---|---|---|
canPlay | File MIME | maybe, | Determines whether a given |
Type() | type | probably, "" | type of video file is supported by the browser. |
load() | none | none | Sets that the video will start playing as soon as it is ready. |
pause() | none | none | Pauses the playback. |
play() | none | none | Starts playing the video file. |
To use a video function, append the function to the name of the video element associated with the video file using dot syntax.
video1Element.play();