HTTP Live Streaming (HLS)
Was this helpful?
Was this helpful?
<video id='hls-video'>
<source src='stream_hls.m3u8' type='application/x-mpegURL'/>
</video>
<script>
fluidPlayer(
'hls-video',
{
hls: {
overrideNative: true
}
}
);
</script><MediaFile id="1" delivery="streaming" type="application/vnd.apple.mpegurl" width="480" height="640">
<![CDATA[ https://example.com/stream_hls.m3u8 ]]>
</MediaFile>fluidPlayer('fluid-player', {
modules: {
configureHls: (options) => {
return {
maxMaxBufferLength: 30, // Max length of buffered video in seconds
startLevel: 4, // Starting quality level - 4 is usually Full HD (1080p), but this can change by source
...options,
}
},
onBeforeInitHls: (hls) => {
hls.startLevel = 4; // Programatically set start quality level
},
onAfterInitHls: (hls) => {
hls.nextLevel = 4 // Programatically set quality level for next segment
},
}
});