Silvio's blog

Archive for the ‘HTML’ Category

[HTML5] Video & Audio elements

  • Terça-feira Jul 14,2009 06:18 PM
  • By admin
  • In HTML

We can finally embed audio and video without java, flash,…

Video Example

<video src="/files/videos/2lcfw1tykbh0.ogg" controls>
  Update your browser to learn how to speak geek
</video>

Audio Example

<audio src="/files/videos/2lcfw1tykbh0.ogg" controls>
  Update your browser to learn how to speak geek
</video>

Attributes

autoplay – Boolean – Starts playing as soon as it’s possible
autobuffer – Boolean – Caches the video before the user decide to play it or not
controls – (it’s presence) – Show playback controls
loop – Boolean – Automatically repeat the video
poster – String – Image URL, the image’ll be shown until the video data is ready
src – String – URL of the video to embed
height – Integer – Player height in pixels
width – Integer – Player width in pixels

At this time, Firefox 3.5 doesn’t support loop nor poster

Your Ads Here
Promote your products