How to use controller in html5
This article mainly shows you "how to use controller in html5", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use controller in html5" this article.
Example
Detect if the video has a media controller:
MyVid=document.getElementById ("video1"); alert ("Controller:" + myVid.controller)
Definition and usage
The controller property returns the current media controller for audio and video.
By default, audio and video elements do not have a media controller. If a media controller is specified, the controller property returns it as a MediaController.
Browser support
The controller attribute is not supported by any major browser.
Grammar
Audio | video.controller value describes the MediaController object
Represents the media controller for audio and video.
MediaController object properties / methods:
Buffered-get the buffer range of audio and video
Seekable-or the addressable range of audio and video
Duration-the length of time to obtain audio and video
CurrentTime-gets or sets the current playback position of audio and video
Paused-detect if audio and video have been paused
Play ()-play audio and video
Pause ()-pause audio and video
Played-check if audio and video have been played
DefaultPlaybackRate-gets or sets the default playback rate for audio and video
PlaybackRate-gets or sets the current playback rate of audio and video
Volume-gets or sets the volume of audio and video
Muted-gets or sets whether audio and video are muted
Example
Detect if the video has a media controller: