Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow plugins to implement custom drm provider #4366

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

KrzysztofMoch
Copy link
Member

Summary

I have changed DRM logic to allow plugins to implement custom drm provider. It should not have impact for current users

Motivation

Allow plugins to implement custom drm provider. Eg. implement DRM SDK form 3th party DRM providers

Changes

  • changed logic of obtaining "DRM Manager"

Test plan

I have ran our DRM example on both iOS & Android physical devices to confirm that "default" DRM works

@KrzysztofMoch KrzysztofMoch requested a review from freeboub January 9, 2025 14:03
Copy link
Collaborator

@freeboub freeboub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, but I am not fan of this solution (I understand the need by the way).
My issue here is that you introduced a dependency between RNVplugin and Exoplayer or AVPlayer.
The day we will support other players, The RNVPlugin will not be compatible with new player implementation.

We have 2 choices to handle that, either

  • remove dependency from RNVPlugin and make a generic api (which looks really tricky on my side).
  • move the DRM management to RNVExoplayerDrmPlugin / RNVAVPlayerDrmPlugin which clearly highlight the player dependency

"@callstack/react-native-visionos": "^0.73.0",
"@react-native-picker/picker": "2.8.1",
"react": "18.2.0",
"react-native": "0.73.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you upgrade react native, split your pr please !

UUID uuid = Util.getDrmUuid(drmProps.getDrmType());
if (uuid != null) {
try {
DebugLog.w(TAG, "drm buildDrmSessionManager");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your code, but I think we should remove this warning (which is not a warning in fact)

Suggested change
DebugLog.w(TAG, "drm buildDrmSessionManager");
DebugLog.d(TAG, "drm buildDrmSessionManager");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants