question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I configure xhrSetup withCredentials property of hls.js?

See original GitHub issue

How 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Addvilzcommented, Jun 22, 2020

@Bogatinovski here’s what you are looking for - https://docs.fluidplayer.com/docs/configuration/advanced/ , specifically configureHls callback.

1reaction
Addvilzcommented, Jun 4, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found