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.

Is the default `initDataTransform` identity function configuration intended?

See original GitHub issue

👋 there. 😃

I’m working on converting our bespoke FairPlay implementation to work within 2.5.5.

While stepping through Shaka’s implementation I arrived at this code in drm_engine:

https://github.com/google/shaka-player/blob/c0e7a9b62a57f73ef26d511e3d40d2dd0f014cb6/lib/media/drm_engine.js#L1020-L1029

I read this as, if a client has not specified a playerConfiguration.drm.initDataTransform callback then the default implementation should be used.

But, it turns out Shaka has a default identity function setup in configuration:

https://github.com/google/shaka-player/blob/c0e7a9b62a57f73ef26d511e3d40d2dd0f014cb6/lib/util/player_configuration.js#L85

So, as a client, if I omit playerConfiguration.drm.initDataTransform than the default handling in drm_engine is ignored.

I want to believe the default impl in player_configuration is unintended based on the function | undefined documentation: https://shaka-player-demo.appspot.com/docs/api/shaka.extern.html#.PlayerConfiguration

Thanks for your feedback.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
TheModMakercommented, Sep 6, 2019

Yes, either of those options should recursively reset all the DRM configurations. There is also a player.resetConfiguration() method you can use to reset all configurations to the default.

0reactions
mseeleycommented, Sep 6, 2019

Thank you very much @TheModMaker.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is the default initDataTransform identity function configuration ...
there. :) I'm working on converting our bespoke FairPlay implementation to work within 2.5.5. While stepping through Shaka's implementation ...
Read more >
Class: shaka.extern - JSDoc
A dictionary which maps key system IDs to advanced DRM configuration for those key systems. initDataTransform, function | undefined, Optional. If given, this ......
Read more >
shaka-player - UNPKG
249, * Reset configuration to default. 250, */. 251, resetConfiguration ( ) : any ;. 252, /**. 253, * Retry streaming after a...
Read more >
Source - GitHub
... in v3.0.0) * **config:** Configuration of factories should be plain factory functions, not constructors; ... Fix FairPlay default initDataTransform ...
Read more >
https://cdn.jsdelivr.net/gh/cdnjs/cdnjs/ajax/libs/...
TrackList ; /** * Gets a map of EME key ID to the current key status. ... string ) : Promise < any...
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