-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
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;
thisismo and bezerra-lucas
Metadata
Metadata
Assignees
Labels
No labels