Front End Technology Articles - Page 486 of 860

HTML DOM Video defaultPlaybackRate Property

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

138 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

150 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

395 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 −

HTML DOM Video currentSrc Property

AmitDiwan
Updated on 30-Oct-2019 07:08:30

121 Views

The HTML DOM Video currentSrc property returns a string corresponding to the url of the video.Following is the syntax −Returning string valuemediaObject.currentSrcLet us see an example of HTML DOM Video currentSrc property −Example HTML DOM Video currentSrc    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }                    HTML-DOM-Video-currentSrc     ... Read More

HTML DOM Video controls Property

AmitDiwan
Updated on 18-Feb-2021 05:09:10

192 Views

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

HTML DOM Video canPlayType( ) Method

AmitDiwan
Updated on 08-Jul-2020 05:52:09

172 Views

The HTML DOM Video canPlayType() returns a string corresponding to whether the browser can play the specified video type or not.SyntaxFollowing is the syntax −Returning boolean value - true/falsevideoObject.canPlayType(typeAsParameter)Here, the return value can be the following −returnValueDetailsprobablyIt defines that browser mostlikely supports the specified video typemaybeIt defines that browsermight support the specified video type, but playback will have tobe attempted to be sure"" (empty string)It defines that browserdefinitely doesn’t supports the specified video typeLet us see an example of Video canPlayType() property −Example Live Demo HTML DOM Video canPlayType()    * {       padding: 2px;   ... Read More

HTML DOM Video buffered Property

AmitDiwan
Updated on 08-Jul-2020 05:52:43

222 Views

The HTML DOM Video buffered property returns a TimeRanges object containing information about the video’s buffered range length and its start, end position.SyntaxFollowing is the syntax −Returning TimeRanges ObjectmediaObject.bufferedLet us see an example of Video buffered property −Example Live Demo HTML DOM Video buffered    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }             ... Read More

HTML DOM Video autoplay Property

AmitDiwan
Updated on 08-Jul-2020 05:53:31

206 Views

The HTML DOM Video autoplay property returns/sets boolean value corresponding to whether the video will play automatically on page load or not.SyntaxFollowing is the syntax −Returning boolean value - true/falsemediaObject.autoplaySetting autoplay to booleanValuemediaObject.autoplay = booleanValueHere, “boolean value” can be the following −booleanValueDetailstrueIt defines that video will automatically play onpage loadfalseIt defines that video will not automatically playon page loadLet us see an example of Video autoplay property −Example Live Demo HTML DOM Video autoplay    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       ... Read More

HTML DOM Underline Object

AmitDiwan
Updated on 30-Oct-2019 06:23:35

197 Views

The HTML DOM Underline Object in HTML represents the element.Creating a elementvar uObject = document.createElement(“U”)Let us see an example of Underline element −Example Live Demo HTML DOM Underline    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    HTML-DOM-Underline          Warning: This is a Demo Example                        var uObject = document.getElementById("Underline");    function getBetterDisp() {       uObject.style.backgroundColor = '#DC3545';       uObject.style.color = '#FFF';    } OutputBefore clicking show button −After clicking show button −

HTML DOM Ul Object

AmitDiwan
Updated on 30-Oct-2019 06:32:25

128 Views

The HTML DOM Ul Object in HTML represents the element.Creating a elementvar ulObject = document.createElement(“UL”)Here, “ulObject” can have the following properties but are not supported in HTML5 −PropertyDescriptioncompactItsets/returns whether the unordered list should be displayedsmaller than usualtypeItsets/returns the value of the type attribute of an unordered listLet us see an example of unordered list element −Example Live Demo Ul item()    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] ... Read More

Advertisements