Cross-Browser HTML5 Video & Audio Tags: html5media

html5media is a JavaScript library that enables every browser to play the media defined inside the HTML5 media tags.

HTML5 video and audio tags were designed to make embedding a video as easy as embedding an image. They were also designed to give users a faster experience by doing away with browser plugins such as Adobe Flash.

html5audiovideoplayer

Unfortunately, older browsers don’t support HTML5 video and audio tags, and even modern browsers don’t support a consistent set of video codecs, making embedding a video rather difficult.

The html5media project makes embedding video or audio as easy as it was meant to be. It’s a fire-and-forget solution, and doesn’t require installing any files on your server. Unlike many other HTML5 video players, it allows people to use the video controls supplied by their own web browser. It’s one of the smallest, fastest solutions available, and as browser technology improves it will become even faster.

Even in the Flash-fallback, the library applies the settings defined inside the <audio> – <video> tags to the player (like poster image).

html5media can be installed to your own website or a free-hosted-version offered for a quick usage.

 

How to enable <video> and <audio> tags in all major browsers

 

To make HTML5 video and audio tags work in all major browsers, simply add the following line of code somewhere in the <head> of your document.

<script src="http://api.html5media.info/1.1.4/html5media.min.js"></script>

How to embed video

You can embed video into your page using the following code.

<video src="video.mp4" width="320" height="200" controls preload></video>

How to embed audio

You can embed audio into your page using the following code.

<audio src="audio.mp3" controls preload></audio>

Compatibility: All Major Browsers
Website: http://html5media.info/
Download: https://github.com/etianen/html5media

Advertisements
Author:
We hope, We will become the best, creative and inspiring community for web and graphics. Join Us! Can be part of the growing Team. Just write something Creative and Interesting. Click here to become a member.

Comments

Trackbacks to this post.
Leave a Reply

Copyright © 2020 Freebies, Free Fonts, WordPress Themes, Logos & Tutorials. All Rights Reserved.
Powered by Wordpress.
About Us | Advertise | Write For Us | Contact Us
3 Shares
Tweet
Share
Share
Pin