Closed slash197 closed 6 years ago
It looks like you're using the configs from videojs/videojs-contrib-dash. They are not directly transferable. There is also no "simple field" for providing your own HTTP headers; you'll have to implement your own getLicense
function, as shown here.
You'll want to do something like:
let source = {
src: mySrc,
type: 'application/dash+xml',
keySystems = {
'com.widevine.alpha': {
getLicense: function(emeOptions, keyMessage, callback) {
let message = new Uint8Array(keyMessage);
videojs.xhr({
uri: widevineUrl,
method: 'POST',
responseType: 'arraybuffer',
body: message,
headers: myHeaders
}, (err, response, responseBody) => {
if (err) {
callback(err);
return;
}
callback(null, responseBody);
});
}
}
}
};
Thank you for the details, appreciate it.
I cannot find a specific way to implement custom headers with widevine, using the config below does not work. Any help is appreciated.