HTML5 video, audio, API controls---the next day

Source: Internet
Author: User

1. Video and audio tags
<video src = "movie.mp4" controls = "Controls" ><video>
or <video controls = "Controls" >
<source src = "Movie.mp4" >
<video>
Property Value Description
AutoPlay AutoPlay (can be omitted) video AutoPlay
Controls controls (can be omitted) to display the playback controls to the user
width px player widths
Height px Player Heights
Loop loop, play continues, play count after playing
Preload proload whether to wait for the load to play again
src URL Video url address
Poster Imgurl loading the waiting picture picture
Autobuffer Autobuffer is set to browser buffering, not valid when setting autoplay
2. HTML5 Video API Control
(1) Get video tag
① through the DOM object var video = document.getElementById ("VideoID");
② by jquery method var video = $ ("#videoID") [0];
Properties of the video tag
Loading video: Load ()
Play Video: Play ()
Pause: Pause ()
Fast forward 10 seconds: currenttime +=10
Playback speed Increased: Playbackrate + +
Playback speed increased 0.1:playbackrate + = 0.1
Volume Increase: Volume + = 0.1
Mute: muted = True
(3) Event
Canplay
Duration Media length
Timeupdate Media Current Location
Third, form
1. Form input type
Type Use example meaning
Email <input type= "email" > Enter email format
Tel <input type= "Tel" > enter mobile phone number format
URL <input type= "url" > Input URL format
Number <input type= "Numbers" > enter numeric format
Search <input type= "search" > Search box (embodying semantics)
Range <input type= "range" > Free drag Slider
Color <input type= "COLOR" > Color picker
Time <input type= "Time" > Hours
Date <input type= "date" > Month Day
DateTime <input type= "datetime" > Time input Box
Month <input type= "month" > Month
Week <input type= "Week" > Year week

2. Form elements
Element meaning
<datalist> Data List
<keygen> generating an encrypted string
<output> Output Results
<meter> measure
3. Form attributes
Attribute usage meaning
Placeholder <input type= "text" placeholder= "Please enter user name" > placeholder
Autofocus <input type= "text" Autofocus> get focus automatically
Multiple <input type= "file" multiple> multi-File upload
AutoComplete <input type= "text" autocomplete= "Off" > Value: Off, on auto-complete
Form <input type= "text" form= "a form ID" >
Novalidate <form novalidate></form> off verification
Required <input type= "text" required> required fields
Pattern <input type= "text" pattern= "\d" > Custom validation

HTML5 video, audio, API controls---the next day

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.