Video, audio and other multimedia
1, native Multimedia: Fast speed, low dependency on plugins.
2. Format of video files
H5 supports the following three types of video file formats (codecs)
A,ogg Theora file with the extension:. Ogg or. OGV
B,mp4 file with the extension:. mp4 or. m4v
C,WEBM extension:. WebM
3. Add a single video to a Web page
< HTML > < Body > < scr= "PADDLE.WEBM"></video> </body></html>
Vedeo properties can be: SCR (source) AutoPlay (auto play) controls (controls) muted (mute) loop (loop) poster (poster) width (width) height (high) preload (preload)
4. Add controls and AutoPlay for video
<HTML> <Body> <VideoSCR= "PADDLE.WEBM"Controls ></Video> </Body></HTML>
< HTML > < Body > < scr= "PADDLE.WEBM" AutoPlay></video > </ Body > </ HTML >
5. Specify loop playback and poster images for video
<HTML> <Body> <VideoSCR= "PADDLE.WEBM"AutoPlay Loop ></Video> </Body></HTML>
<HTML> <Body> <VideoSCR= "PADDLE.WEBM" poster= "Paddle.jpg" ></Video> </Body></HTML>
6, block video preload
<HTML> <Body> <VideoSCR= "PADDLE.WEBM" preload= "None" controls ></Video> </Body></HTML>
7, use multiple sources of video and backup files
<body>
< Videowidth= "369"Height= "208" controls> <SourceSCR= "Paddle.mp4"type= "Video/mp4"> <SourceSCR= "PADDLE.WEBM"type= "VIDEO/WEBM">
</video>
</body>
8, providing accessibility
9, audio file format
. ogg. mp3. wav. AAC. mp4. Opus
10. Add a single audio file with controls to the Web page
< Body > < scr= "Pinao.ogg" controls></audio> </ Body >
11, Auto play, loop and pre-load audio
< body > < audio scr = "Pinao.ogg" AutoPlay controls ></ audio > </ body > < html >
< body > < audio scr = "Pinao.ogg" loop controls ></ audio > </ body > < html >
< Body > < scr= "Pinao.ogg" preload= "Metadate" controls ></audio></body>< HTML >
12, provide multiple video sources with alternate content
1 <Body>2 <AudioControls>3 <SourceSCR= "Pinao.ogg"type= "Audio/ogg">4 <SourceSCR= "Pinao.mp3"type= "Audio/mp3">5 </Audio>6 </Body>
13. Add video and audio for backup flash
<Body> <Videowidth= "369"Height= "208"Controls> <SourceSCR= "Paddle.mp4"type= "Video/mp4"> <SourceSCR= "PADDLE.WEBM"type= "VIDEO/WEBM"> </Video></Body>
Video, audio and other multimedia