dashjs logo

Preload content

This example shows how to use preload feature of dash.js, which allows to initialize streaming and start downloading the content before the player is attached to an HTML5 video element. This feature can be used to optimize content-insertion on platforms which provide only a single decoder.

When this page is loaded, dash.js downloads media segments into a virtual buffer. Once the "Attach View" button is clicked, a video element is attached to dash.js and the downloaded data will be appended to the newly created Source Buffers.

Note that for this feature to work "cacheInitSegments" must be activated.

00:00:00
00:00:00