react-player icon indicating copy to clipboard operation
react-player copied to clipboard

playlist 403 Forbidden

Open taj567 opened this issue 1 year ago • 0 comments

am not able to load the m3u8 video files.

<ReactPlayer ref={player} width={'100%'} height={'100%'} url={'http://nimtrans.ilike.ps:8081/hadaraH/headend_1|RotanaMusic_480p/playlist.m3u8'} playing={playing} muted={muted} pip={pip} stopOnUnmount={!pip} onBuffer={onBuffer} onBufferEnd={onBufferEnd} onDisablePIP={closePip} onDuration={setDuration} onProgress={onProgress} volume={volume / 100} onEnded={onEnded} onPlay={playVideo} onPause={stopPlaying} loop={loop} // config={{ // file: { // hlsOptions: { // xhrSetup: function xhrSetup(xhr, url) { // xhr.setRequestHeader( // "Access-Control-Allow-Headers", // "Content-Type, Accept, X-Requested-With" // ); // xhr.setRequestHeader( // "Access-Control-Allow-Origin", // "http://localhost:3001" // ); // xhr.setRequestHeader( // "Access-Control-Allow-Credentials", // "true" // ); // // xhr.open('GET', url + getQueryParams(mediaStreamUrl)); // } // } // } // }} />

if i uncommet the config file getting cors error.

Screenshot 2023-04-20 at 7 44 43 PM

taj567 avatar Apr 20 '23 14:04 taj567