Couldn't get initDataTransform working for Fairplay
See original GitHub issueHi,
I’try to use FairPlay in Shaka, and right now I’m not able to get it working when it comes to initDataTransform method. I’ve following piece of code (only interesting part):
player.configure('drm.initDataTransform', (initData) => {
const processedData = String.fromCharCode.apply(null, new Uint16Array(initData.buffer)).substring(1);
const contentId = new URL(processedData.substring(1)).hostname;
const cert = player.drmInfo().serverCertificate;
serverProcessSPCPath = processedData.substring(1).replace('skd://', 'https://');
return shaka.util.FairPlayUtils.initDataTransform(initData, contentId, cert);
});
player.configure({
drm: {
servers: {
'com.apple.fps.1_0': licenseServerUrl
},
advanced: {
'com.apple.fps.1_0': {
serverCertificate: new Uint8Array(cert),
},
},
},
});
When I try to play something then I’m receiving error 6015. Actually I’m able to assign result of this method to variable and see, the result but in general Shaka throws error which points to this method. I’ve also investigated values from all variables and everything looks just fine.
Any suggestions, what might be wrong?
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Couldn't get initDataTransform working for Fairplay #2190
Hi, I'try to use FairPlay in Shaka, and right now I'm not able to get it working when it comes to initDataTransform method....
Read more >Class: shaka.util.FairPlayUtils - JSDoc
initDataTransform (initDatanon-null, contentId, certnullable) → {Uint8Array}. Transforms the init data buffer using the given data. The format is:
Read more >AssetId is malformed in Safari Dem… | Apple Developer Forums
I have noticed that when I use an AssetId that is greater than 16 characters long I see that the initData is Safari...
Read more >Unanswered 'fairplay' Questions - Stack Overflow
I'm working with HLS FairPlay but can't correctly delete a protected downloaded content and re-download it in the same session (= without first...
Read more >Untitled
Boy scouts of america secret files, Historical census data mississippi, How to become a ... Get list of tables in postgres, Hgw cyclus...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@victordidenko Actually right now I’m not using shaka for Fairplay… I’m using standard approach (No additional libraries) which works like a charm.
@jpiechowiak I’m having the same issue as well.