-
Notifications
You must be signed in to change notification settings - Fork 72
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
FairPlay KeySessionError #80
Comments
Hi, I get the same error the player correctly retrieves the FairPlay certificate, the license, segments, but this gets this error. |
I am getting the same error, on production, please help |
Hello! When we can get fix about this issue? |
is anyone reading this? |
We have got the same issue: |
It's hard to know exactly what's going wrong with the original reported issue, but it's not likely to be a bug with contrib-eme. That said, we have successfully implemented DRMtoday as our provider. I can't share our implementation as it's proprietary, but, looking at the original report, I noticed a few things that may be incorrect: In
In
I hope this helps others figure out why their integrations aren't working, but, ultimately, it's up to integration authors to understand how to communicate with their DRM vendor. |
Thank you for all those information @misteroneill ! The The fact that I think it's a problem from the plugin and not from my implementation is that the second call to the DRMProvider (GetLicense) is never fired, whatever headers or body I try to provide. When you say that you successfully managed to implement DRMtoday, are you talking about Fairplay DRM ? Because I've managed to setup VideoJS and DRMToday for Widevine easily, but Fairplay seems to be a bit more complicated. Can I ask you which version of VideoJS and contrib-eme you're using on you're working implementation of DRMToday ? |
You're probably right! :)
Yeah, we are using FairPlay and it is working. Our setup could be different, though. We are using the latest versions of both Video.js and contrib-eme. |
One thing you might consider is looking at the Dash.js source. It works seamlessly with DRMtoday out of the box. |
@misteroneill However, playback works fine.. but I have to make a check in my error handling to ignore this error If you could provide me with your email, then I could post you the credentials to check. Many thanks, need your help. |
This is because of the in-spec EME support introduced by Safari 12.1 on macOS 10.14.4 and iOS 12.2. |
@Dardaxe @vksbansal Please try again with v3.5.4 (it is not |
@misteroneill yes, it's fixed in the v3.5.4 |
@misteroneill Sorry for the late answer. Unfortunately I'm still getting the exact same error with videojs-contrib-eme v3.5.4 on Safari 12.1. "com.apple.fps.1_0": {
getCertificate: function(emeOptions, callback) {
console.log('Fairplay: getCertificate')
videojs.xhr({
url: DRM_PROVIDER_CERTIFICATE_URL,
method: 'GET',
responseType: 'arraybuffer',
headers: {
'x-dt-custom-data': btoa(JSON.stringify(MY_CUSTOM_DATA)),
'Pragma': 'no-cache',
'Cache-Control': 'no-cache',
'Content-Type': 'text/xml; charset=utf-8'
}
}, (err, response, responseBody) => {
if (err) {
callback(err)
return
}
console.log('Fairplay: certificate acquired')
callback(null, new Uint8Array(responseBody))
})
},
getContentId: function(emeOptions, initData) {
console.log('Fairplay: getContentId')
const hostname = getHostnameFromUri(uint8ArrayToString(initData))
console.log('Fairplay: getContentId acquired')
return hostname
},
getLicense: function(emeOptions, contentId, keyMessage, callback) {
console.log('Fairplay: getLicense')
let spcMessage = encodeURI(btoa(keyMessage))
videojs.xhr({
url: DRM_PROVIDER_LICENSE_URL,
method: 'POST',
responseType: 'text',
body: `spc=${spcMessage}&${contentId}`,
headers: {
'Content-type': 'application/x-www-form-urlencoded',
'x-dt-custom-data': btoa(JSON.stringify(MY_CUSTOM_DATA))
}
}, (err, response, responseBody) => {
if (err) {
callback(err)
return
}
console.log('Fairplay: License Acquired')
callback(null, responseBody)
})
}
} As I said I'm still getting the same error : @vksbansal Would you mindsharing your implementation of the videojs-contrib-eme plugin if it's working for you, or provide information about what could be wrong or missing on what I posted ? |
I am attaching a zip which is working for me I installed videojs-contrib-eme using below command which installed "videojs-contrib-eme": "^3.5.4", |
@Dardaxe @misteroneill |
Thanks for those information @vksbansal, I've created a reduced test case from the zip you provided with credentials and file from a test account : I've got the same error on this example, getLicense is never called. Is this example working on your side ?
If this example is not working for you either :
|
@Dardaxe Unfortunately, it likely is a problem with integrating with your DRM provider. For instance, for my provider, I have to cast the I tried your jsbin and it didn't work with either Safari (prefix-only or prefix+spec). Even when trying with contrib-eme 3.5.0. So, unfortunately, it looks like #86 / #87 won't fix this issue. |
Because of the "The operation is not supported." error, I assumed this was due to Safari 12.1 on macOS 10.14.4 / iOS 12.2. However, since you're still getting the keySession error with eme 3.5.4, it looks like @misteroneill was right to close the issue. Feel free to join us in the #playback channel on our slack if you'd like some more assistance with troubleshooting. |
Thanks for your tests @squarebracket ! In my opinion (and I might be wrong) if the error I have is an implementation problem, either getCertificate or getLicense should throw an error during their process (as they are the only methods that interacts with my drm provider). I've made a reduced test case with logs showing that : Notice that in my DRM Provider Back office I can see the certificate being requested and correctly delivered : The error is triggered between the getCertificate and getLicense methods. |
For anyone coming here with
|
@Dardaxe Did you ever solve your issue? Getting something similar, though mine switches between On |
This error is happening again on the latest version "videojs-contrib-eme": "3.5.0" please resolve this issue |
I have been working on this for awhile and the only semi-solution I have found is to hide the error with CSS in the case where a key session error will appear, but the video will still play. Not ideal, but something. |
You can pass |
I encountered this error after upgrading my MacOS 10.13 computer to MacOS 10.14. Upgrading videojs-contrib-eme to [email protected] resolved the error. Note: I also had to set the |
Upgrading to 3.5.4 fails to resolve for me (mac 10.13.6) . We see this for certain films only. I am not able to determine what the difference is on the inputs, but many other films are playing without this issue. The video with the error plays, we may just need to remove the error message, as alexanderturinske and ** gkatsev** suggested. But that kind of fix is not a happy one. |
I am facing this issue. Safari Version : 13.1 When I play DRM content in safari, I get error as Then, it displays error as
I am facing this exact issue. |
Hi @Dardaxe In the response handler, I tried as :
Also, left the header section as empty. Attaching the code snippet :
|
Hi,
I'm trying to setup HLS streaming on Safari with Fairplay DRM.
Using :
Videojs 7.5.3
Videojs-contrib-eme 3.5.0
AWS MediaConvert as packager
DRMToday as DRM Provider
I can see that I'm correctly retrieving the FairPlay certificate but the request to the license server never seems to be fired.
I can see two errors in the console :
VIDEOJS: – "ERROR:" – "(CODE:5 MEDIA_ERR_ENCRYPTED)" – "The operation is not supported."
and
VIDEOJS: – "ERROR:" – "(CODE:5 MEDIA_ERR_ENCRYPTED)" – "KeySession error: code 6, systemCode 4294924646
Here's my implementation of GetLicense and GetCertificate :
Does anybody know what could be wrong or if something is missing in my implementation
The text was updated successfully, but these errors were encountered: