How can I configure xhrSetup withCredentials property of hls.js?
See original GitHub issueHow can I configure the xhr
object of HLS.js to send cookies?
Additional context
I have .m3u8 file
hosted with AWS Cloudfront and when playing the video I need to send my signed cookies to the cloudfront url so that I can access the private .m3u8
file.
Hls.js provides the option to customize the xhr request that will load the video files by using the xhrSetup
property in the configuration.
How can I access this configuration property from Fluid player ?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How can I make hls.js send the cookie in request header upon ...
I set an "X-Cookie" like this: var config = { debug: true, xhrSetup: function (xhr,url) { xhr.withCredentials = true; // do send cookie...
Read more >XMLHttpRequest.withCredentials - Web APIs | MDN
The XMLHttpRequest.withCredentials property is a boolean value that indicates whether or not cross-site Access-Control requests should be ...
Read more >HLS - Flowplayer documentation
The plugin is configured in top level configuration under hls namespace. Flowplayer Native configuration properties: property; description; default. native ...
Read more >Mesh Delivery for Video.js | Lumen
If you were using the Video.js Source Handler, please note that with our source handler and hls.js, you need to configure the XMLHttpRequest.withCredentials...
Read more >HLS streaming - Radiant Media Player
However a HLS manifest is also required to have a NAME attribute for each rendition. When set to true this setting will cause...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Bogatinovski here’s what you are looking for - https://docs.fluidplayer.com/docs/configuration/advanced/ , specifically
configureHls
callback.Whoa, nice find! 🥳 However, I would not rely on this forever - as far as I was able to tell from history, this is/was supposed to be internal configuration and not meant for use outside the player. I suspect that is why it was not documented. There seems to be plenty of this kind of stuff in the source base.
I will keep this ticket open because this feature will need some redesign - foreign libraries should be configurable nicely using some callback API and be properly documented.