VideoPlayer
VideoPlayer is an element for presenting videos. Learn more.
Additional information about this section
Store values associated with an object
- currentTime
Gets the current play time from the beginning of the current video, in seconds.
- description
Sets or gets the description of a video. Notes: - Setting a video description only works when a video player is presenting a video uploaded to your site. - ...
- duration
Gets the total play time of the current video, in seconds.
- isMuted
Indicates if the volume is currently muted.
- isPlaying
Indicates if a video is currently playing.
- poster
Sets or gets the image shown in the video player before the video is played.
- src
Sets or gets the file location of the current video.
- title
Sets or gets the title displayed in a video player. Notes: - Setting a video title only works when a video player is presenting a video uploaded to your site. ...
- volume
Sets or gets the video player volume.
- customClassList
A property that represents an element's custom CSS classes.
- deleted
Indicates if an element was temporarily deleted from the DOM. Use the restore function to restore the deleted element.
- rendered
Indicates if an element is currently in the DOM structure.
- global
Indicates if an element appears on all pages or only on the current page.
- id
Gets the element's ID.
- parent
Gets the element's parent element.
- type
Gets the element's type.
- hidden
Indicates if the element is visible or hidden.
- isVisible
Indicates if the element is actually visible.
- collapsed
Indicates if the element is collapsed or expanded.
Perform actions on an object
- mute( )
Mutes video volume.
- onEnded( )
Adds an event handler that runs when playback has ended.
- onPause( )
Adds an event handler that runs when playback is paused.
- onPlay( )
Adds an event handler that runs when playback is started or restarted.
- onProgress( )
Adds an event handler that runs when playback progresses.
- pause( )
Pauses playback.
- play( )
Begins or resumes playback.
- seek( )
Moves playback to the specified time, in seconds.
- stop( )
Pauses playback.
- togglePlay( )
Toggles playback.
- unmute( )
Unmutes video volume.
- delete( )
Deletes an element from the DOM. This is a temporary deletion. Use restore to restore the deleted element. SEO crawlers cannot find content in an element whose ...
- onMouseIn( )
Adds an event handler that runs when the pointer is moved onto the element. You can also define an event handler using the Properties and Events panel.
- onMouseOut( )
Adds an event handler that runs when the pointer is moved off of the element. You can also define an event handler using the Properties and Events panel.
- restore( )
Restores a deleted element to the DOM.
- scrollTo( )
Scrolls the page to the top of the element using an animation.
- onViewportEnter( )
Adds an event handler that runs when an element is displayed in the viewable part of the current window.
- onViewportLeave( )
Adds an event handler that runs when an element is no longer displayed in the viewable part of the current window.
- hide( )
Hides the element and sets its hidden property to true, using an effect if specified.
- show( )
Shows the element and sets its hidden property to false, using an effect if specified.
- collapse( )
Collapses the element and sets its collapsed property to true.
- expand( )
Expands the element and sets its collapsed property to false.