WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Video Object


Video Object

The Video Object is new in HTML5.

The Video object speaks to a HTML <video> element.

Note: The <video> component isn't bolstered in Internet Explorer 8 and prior versions.

Access a Video Object

You can get to a <video> component by utilizing getElementById():

var x = document.getElementById("myVideo");

Create a Video Object

You can make a <video> component by utilizing the document.createElement() method:

var x = document.createElement("VIDEO");

Video Object Properties

Property Description
audioTracks Returns an AudioTrackList object speaking to accessible sound tracks
autoplay Sets or returns whether a video should begin playing when it is ready
buffered Returns a TimeRanges object speaking to the cushioned pieces of a video
controller Returns the MediaController object speaking to the present media controller of a video
controls Sets or returns whether a video ought to have controls shown (play/delay etc)
crossOrigin Sets or returns the CORS settings of a video
currentSrc Returns the URL of the current video
currentTime Sets or returns the present playback position in a video (in seconds)
defaultMuted Sets or returns whether the video ought to be quieted by default
defaultPlaybackRate Sets or returns whether the default playback speed of the video
duration Returns the length of a video (in seconds)
ended Returns whether the playback of the video has ended
error Returns a MediaError object speaking to the mistake condition of the video
height Sets or returns the estimation of the tallness quality of a video
loop Sets or returns whether the video should begin playing once again once more, every time it is finished
mediaGroup Sets or returns the name of the media gather the video(s) is a section of
muted Sets or returns whether the sound of a video ought to be turned off
networkState Returns the present system condition of a video
paused Sets or returns whether a video is paused
playbackRate Sets or returns the speed of the video playback
played Returns a TimeRanges object speaking to the played pieces of the video
poster Sets or returns the estimation of the blurb property of a video
preload Sets or returns the estimation of the preload property of a video
readyState Returns the present prepared condition of a video
seekable Returns a TimeRanges object speaking to the seekable pieces of a video
seeking Returns whether the client is right now looking for in the video
src Sets or returns the estimation of the src property of a video
startDate Returns a Date object speaking to the present time offset
textTracks Returns a TextTrackList object speaking to the accessible content tracks
videoTracks Returns a VideoTrackList object speaking to the accessible video tracks
volume Sets or returns the sound volume of a video
width Sets or returns the estimation of the width quality of a video

Video Object Methods

Method Description
addTextTrack() Adds another content track to the video
canPlayType() Checks whether the program can play the predefined video type
load() Re-loads the video element
play() Starts playing the video
pause() Pauses the at present playing video