<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<video id="video" controls></video>
<script>
if (Hls.isSupported()) {
const video = document.getElementById('video');
const hls = new Hls();
hls.attachMedia(video);
hls.on(Hls.Events.MEDIA_ATTACHED, function () {
hls.loadSource("http://foo.com/abc.m3u8");
});
}
</script>
http header
id: 123
token: 456
I have a video required links to API, this API required to send id & token from HTTP header.
Does anyone know how to add HTTP header into HLS.js?