[en] Using audio and video in Firefox 3.5

Firefox 3.5 introduced support for the HTML 5 audio and video elements, offering the ability to easily embed media into HTML documents.  Currently, only Ogg and WAV format media is supported, but support for other formats is expected to arrive in the future.

Embedding media

Embedding media in your HTML document is trivial:

<video src=“http://v2v.cc/~j/theora_testsuite/320×240.ogg” autoplay>
Your browser does not support the <code>video</code> element.
</
video>

This example plays a sample video from the Theora web site, for example.

Multiple source files can be specified using the source element in order to provide video/audio encoded in different formats for different browsers. For instance:

<video autoplay>
<source src=“foo.ogg” type=“video/ogg”>

<source src=“foo.mov”>

Your browser does not support the <code>video</code> element.

</
video>

will by play the OGG file in browsers supporting the Ogg format. If the browser doesn’t support OGG, it should attempt to use the MOV file.

as goes on: here

Herkesle Paylaşın:
  • Print
  • del.icio.us
  • Facebook
  • email
  • FriendFeed
  • Identi.ca
  • LinkedIn
  • MySpace
  • PDF
  • StumbleUpon
  • Twitter
You can leave a response, or trackback from your own site.

Leave a Reply

Powered by WordPress | Designed by: free Drupal themes | Thanks to hostgator coupon and cheap hosting