A Media Source Extensions shim for video.js.
Lead Maintainer: Jon-Carlos Rivera @imbcmdth
Maintenance Status: Stable
Table of Contents generated with DocToc
On browsers that natively support Media Source Extensions, the HTML implementation will be used. If you're running in an environment without MSE, a Flash-backed polyfill will be used. Currently, the Flash polyfill only supports video content encoded in the FLV file format. For information on how FLVs are structured, Adobe hosts the latest version of the spec on their site.
The Flash polyfill attempts to balance throughput to the FLV with end-user responsiveness by asynchronously feeding bytes to the SWF at a fixed rate. By default, that rate is capped at 4MB/s. If you'd like to play higher bitrate content, you can adjust that setting:
// 8MB/s at 60fpsvideojsMediaSourceBYTES_PER_SECOND_GOAL = 8 * 1024 * 1024;
BYTES_PER_SECOND_GOAL too high may lead to dropped frames during playback on slower computers.
Check out an example of the plugin in use in example.html.
You can configure some aspects of the MediaSource polyfill by specifying a hash of options when you construct it:
var mediaSource = mode: 'html5' ;
How to determine the MediaSources implementation to use. With the
default value of
auto, the presence of native MediaSources is
detected at construction time and they're used if available. Choosing
flash will force the use of that respective MediaSource
implementation, even if it does not appear the browser supports it.
- 1.0.0: throw an error if appends are called during an update
- 0.3.0: Delegate SourceBuffer.abort() calls to the SWF
- 0.2.0: Improve interactivity by batching communication with Flash.
- 0.1.0: Initial release