Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embed video in web page (HTML)

I want embed a video in a webpage.
I don't want to use flash because it's unavailable for a huge number of platforms.
I'm reluctant to use HTML5 becase it's not too standard yet (It IS standard, but most people don't have browsers that support it)

Is there any other way? Or should I stick to HTML5 and a HUGE banner telling people to upgrade their browser?

like image 834
WhyNotHugo Avatar asked Jul 29 '09 14:07

WhyNotHugo


2 Answers

There are a few ways to combine HTML5 video with fallbacks for non-supporting browsers. A few specific solutions have been demonstrated.

One example is Video for Everybody by Camen Design, which conforms to HTML5, and uses conditional comments for IE and a nested object tag for older browsers. This should be standards-compliant, backwards-compatible, and future proof.

like image 158
Michael Zajac Avatar answered Sep 28 '22 03:09

Michael Zajac


HTML 5 is not standard. It is a draft. It will probably become standard one day. It will probably change first.

If you want to embed video in a page then, today at least, Flash is the best supported option you have available. I'd provide a link to a regular downloadable version as an option for people who don't have Flash (or who just want to watch the video in a dedicated video player).

Telling people to upgrade their browser won't help a great deal. As far as I know, the only browser with video support in a stable release is Firefox. Chrome doesn't support it except in the development version. I don't think Opera has brought out a stable build with support. Microsoft certainly hasn't added it to Internet Explorer yet. Safari I'm not sure about.

If you really want to avoid Flash, then you could use an HTML 4.01 object.

<object data="myVideo.ogv" type="video/ogg">
  <!-- fallback content here -->
</object>

… and hope the user has a plug-in capable of handling the video installed.

like image 21
Quentin Avatar answered Sep 28 '22 02:09

Quentin