Found 2202 Articles for HTML

HTML DOM Video networkState Property

AmitDiwan
Updated on 18-Feb-2021 05:30:32

122 Views

The HTML DOM Video networkState property returns a number corresponding to the network state of the video.SyntaxFollowing is the syntax −Returning number valuemediaObject.networkStateHere, the return value can be the following −0 (NETWORK_EMPTY) depicts media has not yet been initialized1 (NETWORK_IDLE) depicts media is active and has selected a resource, but is not using the network2 (NETWORK_LOADING) depicts browser is downloading media data3 (NETWORK_NO_SOURCE) depicts no media source foundLet us see an example of HTML DOM Video networkState property −ExampleLive Demo HTML DOM Video networkState    * {       padding: 2px;       margin:5px;   ... Read More

HTML DOM Video muted Property

AmitDiwan
Updated on 18-Feb-2021 05:31:47

235 Views

The HTML DOM Video muted property returns/sets boolean value corresponding to whether the video’s audio will be on mute or not.syntaxFollowing is the syntax −Returning boolean value - true/falsemediaObject.mutedSetting muted to booleanValuemediaObject.muted = booleanValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that video willhave its audio on mutefalseIt defines that video willnot have its audio on muteLet us see an example of Video muted property −ExampleLive Demo HTML DOM Video muted    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 ... Read More

HTML DOM Video loop Property

AmitDiwan
Updated on 18-Feb-2021 05:33:23

135 Views

The HTML DOM Video loop property returns/sets boolean value corresponding to whether the video will play again automatically on end or not.SyntaxFollowing is the syntax −Returning boolean value - true/falsemediaObject.loopSetting loop to booleanValuemediaObject.loop = booleanValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that video willautomatically play again on endfalseIt defines that video won’tautomatically play again on endLet us see an example of Video loop property −ExampleLive Demo HTML DOM Video loop    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 ... Read More

HTML DOM Video load( ) Method

AmitDiwan
Updated on 18-Feb-2021 05:34:41

177 Views

The HTML DOM Video load() is used for re-rendering of video element after its certain attributes get updated by user such as ‘src’.SyntaxFollowing is the syntax −videoObject.load()Let us see an example of Video load() property −ExampleLive Demo HTML DOM Video load()    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }                 ... Read More

HTML DOM Video height Property

AmitDiwan
Updated on 18-Feb-2021 05:20:06

139 Views

The HTML DOM Video height property returns/sets a number corresponding to height (in pixels) of media.SyntaxFollowing is the syntax −Returning height as a number (px)mediaObject.heightSetting height to a number (px)mediaObject.height = numberLet us see an example of Video height property −ExampleLive Demo HTML DOM Video height    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }         ... Read More

HTML DOM Video ended Property

AmitDiwan
Updated on 21-Dec-2021 09:08:09

162 Views

The HTML DOM Video ended property returns a boolean (true/false) corresponding to whether the video has reached its end or not.SyntaxFollowing is the syntax −Returning boolean valuemediaObject.endedLet us see an example of HTML DOM Video ended property −Example HTML DOM Video ended    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }               ... Read More

HTML DOM Video duration Property

AmitDiwan
Updated on 18-Feb-2021 04:56:21

206 Views

The HTML DOM Video duration property returns a number corresponding to the length of the video (in seconds).NOTE − For live streams it returns ‘Inf’ which is infinite because live streams have no predefined duration.SyntaxFollowing is the syntax −Returning string valuemediaObject.durationLet us see an example of HTML DOM Video duration property −ExampleLive Demo HTML DOM Video duration    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       ... Read More

HTML DOM Video defaultPlaybackRate Property

AmitDiwan
Updated on 18-Feb-2021 05:00:39

122 Views

The HTML DOM Video defaultPlaybackRate property returns/sets a number corresponding to default playback rate of media.SyntaxFollowing is the syntax −Returning defaultPlaybackRate as a numbermediaObject.defaultPlaybackRateSetting defaultPlaybackRate to a numbermediaObject.defaultPlaybackRate = numberNOTE − Number has a max value of ‘16’ and if ‘0.0’ an error occurs.Let us see an example of Video defaultPlaybackRate property −ExampleLive Demo HTML DOM Video defaultPlaybackRate    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {     ... Read More

HTML DOM Video defaultMuted Property

AmitDiwan
Updated on 21-Dec-2021 09:19:42

144 Views

The HTML DOM Video defaultMuted property returns/sets boolean value corresponding to whether the video’s audio will be on mute by default or not.NOTE − This property has no dynamic effect on HTML document but is just a reflection of the state of HTML DOM Video muted property.SyntaxFollowing is the syntax −Returning boolean value - true/falsemediaObject.defaultMutedSetting defaultMuted to booleanValuemediaObject.defaultMuted = booleanValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt definesthat video will have its audio on mute by defaultfalseIt definesthat video will not have its audio on mute by defaultLet us see an example of Video defaultMuted property −Example HTML DOM ... Read More

HTML DOM Video currentTime Property

AmitDiwan
Updated on 18-Feb-2021 05:06:38

379 Views

The HTML DOM Video currentTime property returns/sets the current position of seeker (in seconds) of media.Following is the syntax −Returning seeker positionmediaObject.currentTimeSetting currentTime to seekable positionmediaObject.currentTime = secondsLet us see an example of Video currentTime property −ExampleLive Demo HTML DOM Video currentTime    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }                    HTML-DOM-Video-currentTime                                            var divDisplay = document.getElementById("divDisplay");    var demo = document.getElementById("demo");    function getTrackDetails() {       demo.currentTime = '15';       divDisplay.textContent = 'Some Seconds Avoided';    } OutputBefore clicking ‘Jump some seconds’ button −After clicking ‘Jump some seconds’ button −

Advertisements