Orange-OpenSource / hasplayer.js

Http Adaptive Streaming javascript player based on HTML5 premium extensions (MSE/EME)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Player doesn't send cookies in fragments

MarcelloFincons opened this issue · comments

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?

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.