Hi I am trying to achieve any one of the below
1) Set a extra token to the license url by the code ' requestInfo.url = requestInfo.url + "#12345678";'
OR
2) Set headers by the code 'requestInfo.headers = new String('token:12345678\r\n');'
But nothing seems to work.
After updating the url in receiver logs i see 'Updated requestInfo.url ' with the extra '#12345678' at the end of the license url. But on license server I get only the url which is unmodified ( no #12345678).
Same with requestInfo.headers. I don't see any headers which I set in receiver app when the request comes in license server.
I also tried returning the requestInfo; but with this the chromecast is not able to play anything. So I commented the return statement.
Would appreciate any pointers to fix this issue. Here is my code.
var host = new cast.player.api.Host({
'url': url,
'mediaElement': this.mediaElement_
});
host.onManifestReady = function() {
self.log_('prototype.loadVideo_::My onManifestReady');
};
host.updateLicenseRequestInfo = function(requestInfo){
self.log_('prototype.loadVideo_::updateLicenseRequestInfo()');
self.log_('requestInfo.url ' + requestInfo.url);
self.log_('requestInfo.headers ' + requestInfo.headers);
self.log_('requestInfo.protectionSystem ' + requestInfo.protectionSystem);
self.log_('requestInfo.setResponse ' + requestInfo.setResponse);
self.log_('requestInfo.skipRequest ' + requestInfo.skipRequest);
self.log_('requestInfo.timeoutInterval ' + requestInfo.timeoutInterval);
self.log_('requestInfo.withCredentials ' + requestInfo.withCredentials );
requestInfo.url = requestInfo.url + "#12345678";
//host.licenseUrl = requestInfo.url;
//requestInfo.headers = new String('token:12345678\r\n');
self.log_('Updated requestInfo.url ' + requestInfo.url);
self.log_('Updated requestInfo.headers ' + requestInfo.headers);
//return requestInfo;
};
this.player_ = new cast.player.api.Player(host);