question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't get initDataTransform working for Fairplay

See original GitHub issue

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. 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:closed
  • Created 4 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jpiechowiakcommented, Oct 29, 2019

@victordidenko Actually right now I’m not using shaka for Fairplay… I’m using standard approach (No additional libraries) which works like a charm.

0reactions
abdevnetcommented, Oct 31, 2019

@jpiechowiak I’m having the same issue as well.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found