Video, audio and other multimedia

Source: Internet
Author: User

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

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.