HTML5 video, audio playback and API control event properties

1, video, audio tag

<video src = "movie.mp4" controls = "controls"><video>

Or <video controls = "controls">

<source src = "movie.mp4">

<Video>
HTML5 video, audio playback and API control event properties
2, API HTML5 video controls

(1) obtain video tag

① By DOM object var video = document.getElementById ( "videoID");

② var jQuery by a method of video = $ ( "# videoID") [0];

Property video tag

Loading video: load ()

Play Video: play ()

Pause: pause ()

Forward 10 seconds: currentTime + = 10

Playback speed increases: playbackRate ++

Playback speed increased 0.1: playbackRate + = 0.1

Increasing the volume: volume + = 0.1

Mute: muted = true

(3) Events

canplay  

medium length duration

timeupdate media current position

Third, form
1, form input type
HTML5 video, audio playback and API control event properties
2, form elements
HTML5 video, audio playback and API control event properties
3, Form Properties
HTML5 video, audio playback and API control event properties

Guess you like

Origin blog.51cto.com/14473726/2436526