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.

Remove all FairPlay formatting

See original GitHub issue

It seems that different FairPlay license servers communicate differently. We initially implemented a superset of the format used in Apple’s sample docs, but this turns out to be a poor intermediate format for others to build request/response filters for arbitrary formats.

We should remove the formatting of requests and responses, which unfortunately will require applications to use request/response filters for FairPlay in (probably) all cases.

To close this issue, we should:

  • Remove specific FairPlay formatting from DrmEngine
    • Unfortunately, this will be a breaking change, which makes it difficult to justify cherry-picking to v2.5.x. On the other hand, applications may not be able to use what we shipped in v2.5.0, so it may be better to break it quickly and get it over with.
  • Write a tutorial document on special requirements of FairPlay usage, including:
    • Server certificate
    • Request/response filters
    • Sample request/response filters for common formats we encounter
  • Add functionality to the demo app to allow request/response filters to be specified for custom assets, to facilitate FairPlay testing
    • This will involve eval, which is regrettable, and will need to be whitelisted in build/conformance.textproto

See also https://github.com/google/shaka-player/issues/1915#issuecomment-493374738, #1923.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
TheModMakercommented, Aug 6, 2019

I wonder if we should just remove all formatting from FairPlay requests. So all we’d do is pass the init data we get from the browser. The app would then have to create a request filter that appends their cert. We could provide a helper to aid in this. This would allow the app to have their own content ID calculations. We also would no longer require a server certificate for FairPlay since the app will be adding it in the request filter. So every app would need to do something like:

player.getNetworkingEngine().registerRequestFilter((type, request) => {
  if (type != shaka.net.NetworkingEngine.RequestType.LICENSE) {
    return;
  }

  const initData = new Uint8Array(request.body);
  const contentId = shaka.util.FairPlayUtils.defaultGetContentId(initData);

  request.body = shaka.util.FairPlayUtils.defaultCreatePostData(
      initData, contentId, myCert);
});

We could even have a default filter generator, something like this:

player.getNetworkingEngine().registerRequestFilter(
    shaka.util.FairPlayUtils.createRequestFilter(myCert));
player.getNetworkingEngine().registerRequestFilter(
    shaka.util.FairPlayUtils.createRequestFilter(myCert, getContentId));
// Or alternatively
shaka.util.FairPlayUtils.addRequestFilter(player, myCert, getContentId));
0reactions
TheModMakercommented, Aug 23, 2019

These will be cherry-picked to appear in v2.5.5. But, to avoid breaking anyone depending on it, we will still provide the old filters by default. For v2.5.x, you can disable this by setting the drm.fairPlayTransform configuration to false. This will be the default in v2.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove all FairPlay formatting · Issue #1951 · shaka ... - GitHub
I wonder if we should just remove all formatting from FairPlay requests. So all we'd do is pass the init data we get...
Read more >
Clear all text formatting - Microsoft Support
Clear all text formatting ; In Word and Publisher. On the Home tab, in the Font group, click Clear All Formatting. The Clear...
Read more >
How to Get Rid of Apple FairPlay DRM and Get More Freedom
In this post, I will show you different tools to remove FairPlay DRM from ... convert Apple Music format to other more compatible...
Read more >
How to Remove Apple's Fairplay DRM Protection
Every Fairplay DRM encrypted files are encoded with MP4 container format and AAC audio stream codec. When we buy or rent a movie...
Read more >
MP-70/50 Series Scoreboard Controller User Guide
Follow these steps to remove all of the players from either team for a mass player substitution. This action will take all players...
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