Ticket #754 (closed feature: fixed)

Opened 3 years ago

Last modified 3 years ago

Define embed/fallback mechanism

Reported by: jeroen Owned by: jeroen
Priority: Milestone: HTML5 beta
Component: Keywords:
Cc: zach, pablo Forum thread:

Description

Since the video tag is brand new and not widely supported yet, we should think of sane defaults and fallbacks. For example, should we allow people to indeed insert a video tag?

<video width="480" height="270" poster="/player/testing/files/bunny.jpg">
  <source src="/player/testing/files/bunny.mp4" type="video/mp4" />
  <source src="/player/testing/files/bunny.ogg" type="video/ogg" />
  <a href="/player/testing/files/bunny.mp4">Download the video</a>
</video>

This has the disadvantage that it preloads the video in Safari / Chrome, breaks in certain versions of IE and relies on javascript to give mobile phones nice looking fallbacks with a poster frame.

In contrast, we could opt to make people set the real fallback (just a link to the video) and then progressively enhance to the video tag using javascript.

<a href="/player/testing/files/bunny.mp4">
  <img width="480" height="270" src="/player/testing/files/bunny.jpg" />
</a>

We'd then do the following enhancements:

  1. If the browser supports H264, we'd insert a video tag with the H264 video.
  2. If the browser supports OGG, we'd insert a video tag with the OGG video.
  3. If the browser supports Flash 9.0.115+, we'd insert a Flash player with the H264 video.

Change History

comment:1 Changed 3 years ago by jeroen

2 advantages of the video tag approach:

  • It is the way the video tag is intended to be used. Building an HTML5 videoplayer without using the video tag on the page might look strange.
  • A large number of variables (width, height, ogg + h264 files, thumbnail) can be set directly in HTML, as opposed to needing to enter them in the javascript configuration.

comment:2 Changed 3 years ago by jeroen

  • Status changed from new to closed
  • Resolution set to fixed

Totally done and documented in HTML5Embedding?

Note: See TracTickets for help on using tickets.