onXhrOpen setup to remove the 'range' header before sending the request?
kylane opened this issue · comments
Ahoy!
Thanks for this component - has been awesome.
Having trouble trying to modify the request headers, as we're having some cloudfront issues with the 'range' header - how would I go about removing the range from the request headers?
Cheers!
Would this do the trick?
<ReactJWPlayer
playerId="previewVideo"
playerScript="https://cdn.jwplayer.com/libraries/XXX.js"
onVideoLoad={this.videoLoaded}
onSetupError={this.videoFailed}
onMediaError={this.videoFailed}
isAutoPlay
playlist={
[{
sources: [
{
file: previewMediaUrl,
onXhrOpen: (xhr) => {
xhr.setRequestHeader('range', '');
},
},
],
}]
}
/>