Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Introducing the HTML5 Video Element

DZone's Guide to

Introducing the HTML5 Video Element

· Web Dev Zone ·
Free Resource

Learn how error monitoring with Sentry closes the gap between the product team and your customers. With Sentry, you can focus on what you do best: building and scaling software that makes your users’ lives better.

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>
<html>
<body>
<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.
</video>
</body>
</html>
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 .

What’s the best way to boost the efficiency of your product team and ship with confidence? Check out this ebook to learn how Sentry's real-time error monitoring helps developers stay in their workflow to fix bugs before the user even knows there’s a problem.

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}