Skip to content

Allow preload of Dash media without a video element

Vinay Rosenberg requested to merge github/fork/bbc/preload into development

Created by: robertbryer

This pull request adds preload() to the player, which initialises the streaming portion of the player without a video element, so implementors can have a media item ready for immediate playback when a view is eventually attached.

Example:

var player = dashjs.MediaPlayer().create();
player.initialize(null, url, true);
player.preload();
//After a delay to load content
player.attachView($('video'))

SourceBufferController is removed, replaced by SourceBufferSink and PreBufferSink, two classes implementing a new FragmentSink interface. There are a few changes elsewhere to not assume the existence of a video element. Some PLAYBACK_NOT_INITIALIZED errors from mediaplayer.js are now STREAMING_NOT_INITIALIZED, but otherwise no other aspect of the API has changed.

Merge request reports