Over a million developers have joined DZone.

Introducing the HTML5 Video Element

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

Forget using the <iframe> element for sharing videos to your friends. There is an easier way to do this. Now, with HTML5 you can use the <video> element:

 <!DOCTYPE html>
<video width="448" height="336" controls="controls" poster="poster.jpg">
  <source src="Nole vs. Rafa.mp4" type="video/mp4" />
  <source src="Nole vs. Rafa.ogg" type="video/ogg" />
  Your browser does not support the video tag.
And the output will be:

The <video> tag is supported in Internet Explorer 9 (earlier versions does not support the <video> element), Firefox, Opera, Chrome and Safari.

poster="poster.jpg" – specifies an image to be shown while the video is downloading, or until the user hits the play button

For more informations, please visit http://www.w3.org/TR/html5/the-video-element.html#the-video-element .

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.


Published at DZone with permission of A. Programmer. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}