-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Changes in Apple FairPlay integration in 4.1.1? #4349
Comments
I believe some code that was removed in an earlier release was restored in v4.1.2 by @avelad. We apologize for the inconvenience. Can you please try with v4.1.2 (released yesterday)? |
I tested 4.1.2 immediately early morning, unfortunately, it's not fixed, 6006 error still:
|
I made a mistake. It looks like that was not cherry-picked to v4.1. Can you please try with the latest nightly build? https://nightly-dot-shaka-player-demo.appspot.com/ Or to load into your own app: https://nightly-dot-shaka-player-demo.appspot.com/dist/shaka-player.compiled.js |
Similar issue. FairPlay does not load license server after 3.3. Have updated to 4 to trial some fixes and now not seeing any license requests and result in 7000 error. |
@avelad, can you take a look at this? I am not very familiar with FairPlay. |
@joeyparrish I’m on holidays until 9 August… sorry |
No worries! Enjoy your holiday. |
@stuartflanagan, error code 7000 is LOAD_INTERRUPTED. This should only be possible with conflicting inputs from the application (calling load, unload, detach, or destroy during an in-progress load). It's possible that some internal timing has changed and some part of your application that happened to work with v3 just happens not to work with v4. Are you awaiting the result of load() calls, or do you ignore the result? The changes made to restore some missing FairPlay functionality are in the main branch and nightly demo build, and will be in the upcoming v4.2 release. Is anyone able to confirm that whether or not they still have issues with the main branch or nightly demo build? |
Hi @joeyparrish I will need to build the code to run it in our application. |
Hello there! We recently faced the same problem with shaka v4.1.2. DRM module fails to make a request and crushes with 6006 error |
I had similar issues and ended up setting as well as changing all instances of It might not be an option for you to set |
Thank you @fredrik-telia. I will give it a try and let you know if your suggestion helps |
I believe it was from this change: 5441f93 So make sure you're running that code, I think it will be included in the upcoming 4.2.0 release, I probably should have mentioned that I had to build shaka from master in order to get drm working in Safari, sorry about that. |
Actually, I tried a built from the master branch as well and got another error 6007 (LICENSE_REQUEST_FAILED), but it could be related to out DRM server. Thanks again! |
Guys, FYI I had the same issue (error 6006) : after shaka-player update from 3.2.9 to 4.1.2, video playback got broken with Fairplay in Safari MacOS v15.5. I fixed it by using key system My DRM provider is EZDRM and our legacy import { util, extern } from 'shaka-player';
function assert(condition: boolean, message?: string): asserts condition {
if (!condition) {
// eslint-disable-next-line no-console
console.trace();
throw new Error(message);
}
}
function assertIsDefined<T>(val: T, message?: string): asserts val is NonNullable<T> {
assert(val !== undefined && val !== null, message ?? `Expected 'val' to be defined, but received ${val}`);
}
const APPLE_FAIRPLAY_KEY_SYSTEM = 'com.apple.fps.1_0';
function initDataTransform(initData: Uint8Array, initDataType: string, drmInfo: extern.DrmInfo | null): Uint8Array {
if (drmInfo?.keySystem !== APPLE_FAIRPLAY_KEY_SYSTEM || initDataType !== 'skd') {
return initData;
}
const certificate = drmInfo?.serverCertificate;
assertIsDefined(certificate);
const initDataAsString = util.StringUtils.fromBytesAutoDetect(initData);
const contentId = initDataAsString.split(';').pop();
assertIsDefined(contentId);
return util.FairPlayUtils.initDataTransform(initData, contentId, certificate);
} Now everything is working fine w/ version 4.1.2 on Safari MacOS v15.5 and also iOS Safari v15.4 ==== A couple of off-topic sidenotes to shaka-player contributors/maintainers :
These were my two cents :) ... Otherwise thank you for the great work !... |
We are aware of the modularity problem, and it's a problem in some cases for us at Google, too. Expect to see some work on that in Q1 or Q2 2023. We've been building on this structure for over six years now, so it's not trivial to undo that. The results will likely spawn a Shaka v5, since I don't think it's feasible to do it in a backward compatible way. As for the inclusion of FairPlayUtils vs moving to docs/contrib, we debated that in #4309 (comment), and this was the conclusion that @avelad, @littlespex and I ended up at. If you want to exclude them, you may do that at build time in a custom build. We understand that's not ideal for everyone. The good news is that the compiled version of FairPlayUtils currently only adds 1998 bytes to the build. Thanks @loicraux for the pointers:
@jakubkrolikowski, do these tips help? |
Hi @joeyparrish! I followed suggested hints, and Shaka's behavior become even stranger. In most cases the player gives 3016 error, but occasionally it plays a live stream. The only working solution for us at the moment is using PatchedMediaKeysApple polyfill. |
All this, in 4.2 will be solved since it is allowed to use the modern API and the legacy. We have to see if we can speed up 4.2 to avoid these issues. As soon as I get some time, I'll talk to @joeyparrish about this. |
I'll start preparing for bugfix releases and also v4.2. Sorry for the delay! |
@joeyparrish I think it would be good to include #4386 as well. |
I agree, but I'll need to check in with @theodab to see when that will be ready to merge. Hopefully it will be ready soon and we won't have to delay v4.2 to include it. |
@jakubkrolikowski Does this answer all your questions? If so, would you please close the issue? |
v4.2.0 is out now. If you need to reopen this issue, just put |
@joeyparrish I just checked version 4.2.0 and applied these two changes:
and everything works very well, the problem is solved! Thank you! |
Awesome, I'm so glad to hear it! Thanks to @avelad for working on this! |
Have you read the Tutorials?
yes
Have you read the FAQ and checked for duplicate open issues?
yes
What version of Shaka Player are you using?
4.1.1
Please ask your question
I'm trying to upgrade from 3.3.7 to 4.1.1 and cannot make the player work with FairPlay DRM encrypted content.
I get this error message after video manifest is loaded:
My code looks like this, and it works great till 3.3.7.
I've noticed a lack of PatchedMediaKeysApple debug infos in the console, so I guess there is a significant change from 4.1.
With 4.1.1 the browser console looks like this:
What I'm doing wrong?
The text was updated successfully, but these errors were encountered: