Orange-OpenSource / hasplayer.js

Http Adaptive Streaming javascript player based on HTML5 premium extensions (MSE/EME)
Other
198 stars 67 forks source link

Player doesn't send cookies in fragments #239

Open MarcelloFincons opened 6 years ago

MarcelloFincons commented 6 years ago

Hi, i need to stream a Manifest URL file (no DRM protected) that respond with cookies that the player needs to send in each fragment called after. My code is very simple:

var stream = {
    url: "Manifest URL"
};
var mediaPlayer = new MediaPlayer();
mediaPlayer.init(document.querySelector("#videoPlayer"));
mediaPlayer.load(stream);

The problem is that each called fragment responds with error 403, i tried with fiddler blocking request and resent them with cookie and it works! How can i send the cookies received in each fragment?

bbert commented 5 years ago

Hi, Indeed, the XHR for manifest and segments are not configured to use credentials. As in dash.js, we could add the possibility to use credentials for these requests. By the way, have you tried using dash.js project instead of hasplayer.js? We now recommend using dash.js with mss package.