HTML5 audio and video related properties and methods

Source: Internet
Author: User

Method
Method Description
Addtexttrack () Add a new text track for audio and video
Canplaytype () Check that the specified audio and video formats are supported
Load () Reload Audio and Video labels
Play () Play audio and video
Pause () Pause playback of current audio and video
Property
Properties Description
Audiotracks Returns the list of available tracks (Multipletracklist object)
AutoPlay Auto play after media load
Buffered Returns the time range of the buffer part (Timeranges object)
Controller Returns the current media controller (Mediacontroller object)
Controls Display the broadcast control
Crossorigin Cors Settings
Currentsrc Returns the URL of the current media
CurrentTime Current playback time, in seconds
defaultmuted Default is Mute
Defaultplaybackrate Default speed of Broadcast control
Duration Returns the total duration of media playback, in seconds
Ended Returns whether the current play end flag
Error Returns the current playback error status
Initialtime Return to the initial playback position
Loop Whether to loop playback
MediaGroup Current audio and Video media Group (used to link multiple audio and video tags)
Muted is muted
Networkstate Returns the current network status
Paused Whether to pause
Playbackrate Play the speed
Played The time range (Timeranges object) that the current playback part has played
Preload Whether to load audio and video simultaneously when the page loads
ReadyState Returns the current readiness state
Seekable Returns the time range (Timeranges object) of the currently available jump part
Seeking Returns whether the user has done a jump operation
Src The URL of the current audio and video source
Startoffsettime Returns the current time offset (Date object)
Texttracks Returns the available text tracks (Texttracklist object)
Videotracks Returns the available video tracks (Videotracklist object)
Volume Volume value
Event
Events Description
Abort This event occurs when the audio/video load is terminated abnormally
Canplay This event occurs when the browser can start playing the audio and video
Canplaythrough This event occurs when the browser can start playing the audio and video to the end without having to stop due to buffering
Durationchange This event occurs when the total length of the media changes
Emptied This event occurs when the current playlist is empty
Ended This event occurs at the end of the current playlist
Error This event is generated when an error occurs loading media
Loadeddata This event occurs when media data is loaded
Loadedmetadata This event occurs when the total length of time, resolution, and metadata of the word track are received
Loadstart This event occurs when you start to find media data
Pause This event occurs when the media is paused
Play This event occurs when the media is playing
Playing This event occurs when the media resumes to play from pause and stop caused by buffering
Progress This event is generated when the media data is fetched
Ratechange This event occurs when the playback multiplier changes
seeked This event occurs when a user completes a jump
Seeking This event occurs when the user is performing a jump operation
Stalled This event occurs when an attempt is made to obtain media data but the data is not yet available
Suspend This event occurs when data is not obtained
Timeupdate This event occurs when the current playback position has changed
Volumechange This event occurs when the current volume changes
Waiting This event occurs when a video is stopped due to buffering the next frame

HTML5 audio and video related properties and methods

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.