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.

Clarification on customizing "drm.initDataTransform"

See original GitHub issue

Have you read the FAQ and checked for duplicate open issues? Yes

What version of Shaka Player are you using? 2.5.8

Please ask your question I recently reported an issue on the Shaka Packager issue tracker regarding an error I get for Fairplay content packaged with Shaka Packager and played with Shaka Player: Shaka Error DRM.INIT_DATA_TRANSFORM_ERROR (RangeError: Malformed FairPlay init data).

They brought in @joeyparrish asking if he knew what it might be and he responded with referencing the Tutorial for customizing the init data.

The issue I’m facing is that It’s not clear to me how to go about implementing a custom initDataTransform. The tutorial show a code sample using a function called getMyContentId with no further elaboration.

Also, the tutorial states If you don't use the default content ID derivation, you need to specify a custom init data transform: Which seems to imply that it’s not required.

Any help would be appreciated. Thank you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
TheModMakercommented, Feb 10, 2020

Getting a 500 response is different from DRM.INIT_DATA_TRANSFORM_ERROR. The DRM.INIT_DATA_TRANSFORM_ERROR means the init data transform function threw an exception; a 500 response means the init data transform worked fine but the license server rejected the request.

My guess is there are two errors here. First is #2214 where we call the init data transform twice. The first works fine, and the second gives a DRM.INIT_DATA_TRANSFORM_ERROR. The other error is the first transform call works but is rejected by the server. What is probably happening is the server doesn’t recognize the data. The data could be invalid from the browser, the server may expect you to wrap/transform the data before sending it, or your content ID may be invalid.

If JW Player works out-of-the-box, we may need to look at how they are handling the license to see why we get a 500 from the server.

0reactions
salmorocommented, May 14, 2020

@TheModMaker Yup that fixed it. TYVM!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clarification on customizing "drm.initDataTransform" #2370
The tutorial show a code sample using a function called getMyContentId with no further elaboration. Also, the tutorial states If you don't use ......
Read more >
Class: shaka.util.FairPlayUtils - JSDoc
Transforms the init data buffer using the given data. The format is: [4 bytes] initDataSize [initDataSize bytes] initData [4 bytes] contentIdSize ...
Read more >
shaka-player/CHANGELOG.md
255, - Fix setting robustness settings in DRM config ... 333, - Make it easier to add custom overflow menu items.
Read more >
Source - GitHub
initDataTransform" changed Deprecated (with backward compatibility until ... Update Manifest Parser documentation - Clarify track selection callback in ...
Read more >
VUDRM Documentation
Our VUDRM Admin page gives you the tools you will need to test our DRM services with your content. If you need assistance...
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