Skip to content

BaseHlsVideo

Component to implement the HLS.js JavaScript library which adds an HTTP Live Streaming client. It relies on HTML5 video and MediaSource Extensions for playback.

Props

Prop nameDescriptionTypeValuesDefault
mediaUrlurl of the media to be displayedstring-''
mediaPosterUrlurl of image for poster property in html5 video tagstring-''
displaySizeset height and with from outsideobject-{
height: '720px',
width: '1280px'
}
autoplaystart video on loadboolean-false
buttonTitledefine play button text
could be string or path to i18n json as well
string-'Play'
hlsStartLeveldefine startLevel (size) of hls-video
Note: The default value of -1 indicates automatic start level selection.
number--1

Methods

play

initialize hls player and start video

pause

pause video