-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keySystemSessionUpdateFailed error #6874
Comments
I'd recommend contacting your DRM provider and verifying that the license and certificate URLs and parameters are correct. |
Hi @robwalch thanks for the response. While i'm still asking to my drm provider. The keys that returned was arraybuffer, is it incorrect response that causing error? |
The key message is converted to a Uint8Array here: hls.js/src/controller/eme-controller.ts Line 1009 in 6e0656a
|
I don't think the issue comes from drm provider, since hls.js successfully got the license. However, the .updateKeySession function throwing an error and i dont know why |
Hello @robwalch sorry to bothering you. I think there is some miss configuration from my config. For the first time, The certificate was successfully sended by drm provider. But when hls.js call the renewLicense, then the updateKeySession called. It become error So i think there is some miss config, perhaps. Starts from the licenseXhrSetup, is it okay to just return the licenseChallenge? Do I need to call send() function from XHR inside that function? I'm really new for this kind of technology. So sorry to bother you again and again |
No, but they should provide technical support with regards to your configuration, and help verify that the license is delivered correctly. They would also have instructions on how to format the response for JavaScript based players using EME. |
Useful information provided in #6865, not included in this issue's description:
That issue includes logs that differ from this one, where key-status reaches "usable". The logs above are more consistent with screenshots from #6865 showing a Type error on The error suggests that the data passed to it was not formatted correctly. |
I have some testing experience with AWS MediaPackage SPEKE v2 media (DRM Today / Castlabs). The setup that works is as follows. Note that you need to include a 'x-dt-custom-data' request header when posting the license, which you should have already if you've got Widevine working: {
debug: true,
emeEnabled: true,
drmSystems: {
'com.apple.fps': {
licenseUrl: `${fpsLicenseUrl}`,
serverCertificateUrl: `${fpsCertificateUrl}`,
},
'com.widevine.alpha': {
licenseUrl: `${widevineLicenseUrl}`,
generateRequest(initDataType, initData, context) {
return { initDataType, initData };
},
},
'com.microsoft.playready': {
licenseUrl: `${playreadyLicenseUrl}`,
},
},
licenseXhrSetup(xhr, url, keyContext, licenseChallenge) {
if (keyContext.keySystem === 'com.apple.fps') {
xhr.responseType = 'text';
}
xhr.open('POST', url, true);
xhr.setRequestHeader(
'x-dt-custom-data',
`${drmTodayCustomData}`, // btoa(JSON.stringify(customDataFromDrmProvider)));
);
return licenseChallenge;
},
licenseResponseCallback(xhr, url, keyContext) {
if (keyContext.keySystem === 'com.apple.fps') {
const base64Decode = (base64encodedStr) =>
Uint8Array.from(atob(base64encodedStr), (c) => c.charCodeAt(0));
const data = base64Decode(xhr.response);
return data.buffer;
}
return xhr.response;
},
} |
|
Thanks for the response @robwalch, i just realize that i need to send the spc data as binary. So how do i get the spc data, and turn it into the binary data? |
Just a note, we also have integration docs available for hls.js. I am not entirely sure about the implementation in hls.js, but if this is going through the EME implementation for FPS, there should be no need further manipulate or transform the data when sending it out. The payload created by the key system should work for the POST. It is correct that the response needs to still be transformed. I will bring this up with the team since we should be able to also avoid this step. |
What do you want to do with Hls.js?
Hello, i want to play the FPS content using hls.js but facing the issue like this
And here's for the config
did i miss something?
Really appreciate to anyone that help me to solve the problem
thank you
What have you tried so far?
No response
The text was updated successfully, but these errors were encountered: