The issue is supposed to have been resolved in #1977 , but it does not seem to be the case.
I am trying to set a custom xhrSetup() in the hls.js config. Yet, the function does not seem to be called.
Tested on versions 3.3.3 and 3.4.0.
Steps to reproduce:
- Use
<ReactPlayer /> with a .m3u8 HLS stream url.
- Pass a config object with a
xhrSetup() to the player.
- Notice that the
console.log() is not printed and the headers are not changed.
Example:
import ReactPlayer from "react-player";
function App() {
const config = {
hls: {
xhrSetup: (xhr: XMLHttpRequest, url: string) => {
console.log("xhr setup");
xhr.setRequestHeader("example_header", "value");
},
debug: true,
},
};
return (
<>
<ReactPlayer
controls
config={config}
src="https://stream.mux.com/VcmKA6aqzIzlg3MayLJDnbF55kX00mds028Z65QxvBYaA.m3u8"/>
</>
)
}
export default App;
The issue is supposed to have been resolved in #1977 , but it does not seem to be the case.
I am trying to set a custom xhrSetup() in the
hls.jsconfig. Yet, the function does not seem to be called.Tested on versions
3.3.3and3.4.0.Steps to reproduce:
<ReactPlayer />with a .m3u8 HLS stream url.xhrSetup()to the player.console.log()is not printed and the headers are not changed.Example: