• Stars
    star
    1,276
  • Rank 36,602 (Top 0.8 %)
  • Language
    JavaScript
  • License
    GNU General Publi...
  • Created over 14 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Enables <video> and <audio> tags in all major browsers.

HTML5 video made easy

All it takes is a single line of code to make HTML5 video and audio tags work in all major browsers.

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.8/html5media.min.js"></script>

That's it! There is no second step!

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>

For more information and troubleshooting, please visit the video wiki page.

How to embed audio

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

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

For more information and troubleshooting, please visit the audio wiki page.

Why use html5media?

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.

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.

More information

The html5media project is open source and can be found on GitHub. You can find out more information on the html5media wiki, or the main html5media project page.

About the author

Dave Hall is a freelance web developer, based in Cambridge, UK. You can usually find him on the Internet in a number of different places:

Extra credits

The html5media project bundles together a number of excellent open-source and creative-commons projects. They are listed below.

More Repositories

1

django-reversion

django-reversion is an extension to the Django web framework that provides version control for model instances.
Python
2,969
star
2

django-watson

Full-text multi-table search application for Django. Easy to install and use, with good performance.
Python
1,187
star
3

django-herokuapp

A set of utilities and a project template for running Django sites on Heroku.
Python
429
star
4

django-s3-storage

Django Amazon S3 file storage.
Python
407
star
5

django-python3-ldap

Django LDAP user authentication backend for Python 3.
Python
398
star
6

django-require

A Django staticfiles post-processor for optimizing with RequireJS.
JavaScript
237
star
7

aiohttp-wsgi

WSGI adapter for aiohttp.
Python
231
star
8

logot

Test whether your code is logging correctly 🪵
Python
89
star
9

cms

A collection of Django extensions that add content-management facilities to Django projects.
Python
40
star
10

django-historylinks

Automatic SEO-friendly HTTP 301 redirects if the URL of a model changes.
Python
37
star
11

django-usertools

A fire-and-forget enhancement to the Django user admin
Python
32
star
12

django-optimizations

A utility library for Django aimed at improving website performance
Python
32
star
13

django-uuid-upload-path

Generate short UUIDs and use them as paths for uploaded media files in Django.
Python
19
star
14

moody-templates

A fast, extensible templating engine for Python 3 with Django-like syntax.
Python
18
star
15

django-subscribers

Python
12
star
16

django-require-s3

An integration between django-require and the S3 storage backend from django-storages.
Python
8
star
17

jquery-showcase

A snazzy little showcase widget, built using jQuery.
JavaScript
5
star
18

py.sh

Install and manage a standalone Python interpreter and dependencies.
Python
4
star
19

requirejs-tpl-angular

AngularJS template loader plugin for RequireJS.
JavaScript
3
star
20

state-machine

Immutable state management for javascript clients and servers.
JavaScript
2
star
21

catcam

Don't want the cat to get up to any shenanigans while we are away...
Python
2
star
22

js-base-error

A base error class with stack trace support.
JavaScript
2
star
23

requirejs-less

LESS stylesheet loader plugin for RequireJS.
JavaScript
2
star
24

js-set

Helpers for using unique sorted arrays as sets.
TypeScript
1
star
25

lowline

A more efficient Cow<str> and Vec<Cow<str>>.
Rust
1
star
26

radiopi

RadioPi control daemon
Python
1
star
27

olaf-the-beheader

OLAF BEHEAD PUNY FILES!
Python
1
star