Bearer JWT with partial M3U8 [HLS] #5020
Replies: 1 comment 3 replies
-
If you are using const hls = new Hls({
maxLiveSyncPlaybackRate: 1.5,
xhrSetup: function (xhr, url) {
xhr.setRequestHeader('Authorization', "Bearer something");
},
fetchSetup: function (context, initParams) {
initParams.headers = {
...initParams.headers,
'Authorization': `Bearer something`
};
return new Request(context.url, initParams);
},
}); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hey,
How to pass a JWT by Header to a partial M3U8?
I use
Authorization: Bearer MY_JWT
as you said in manual.Request to
.../index.m3u8
works well, but the JWT is not propagated to the m3u8 part.I can add
?jwt=JWT
but then Bearer doesn't make sense.Beta Was this translation helpful? Give feedback.
All reactions