hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

Parameters in sub requests

Open AlexisBallo2 opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I am trying to authorize urls for streaming HLS video. I am able to sign the url for the path, but the signing API returns tokens that I pass as parameters to access the m3u8 files. The issue is that I can successfuly access the first m3u8 directly - using the loadsource url with params, but all subrequests that the hls package makes are made using the base directory and do not include parameters.

Describe the solution you'd like

I would love to see the ability to pass parameters (tokens, etc) to the HLS source so authentication can be made in file requests.

Additional context

No response

AlexisBallo2 avatar Jun 23 '22 13:06 AlexisBallo2

You can implement custom loaders or use xhrSetup to achieve this, otherwise the expectation (and requirement in Safari) is that your server would add these arguments to the playlist urls in your manifest.

robwalch avatar Jul 13 '22 01:07 robwalch