DRM connectors for @theoplayer/react-native
npm install @theoplayer/react-native-drmThe @theoplayer/react-native-drm package provides a set of connectors for react-native-theoplayer,
allowing playback of DRM-protected content.
``sh`
npm install @theoplayer/react-native-drm
The connector needs to be registered to the ContentProtectionRegistry, providing bothintegrationId and keySystemId:
`typescript
import { ContentProtectionRegistry } from 'react-native-theoplayer';
import { EzdrmFairplayContentProtectionIntegrationFactory } from 'react-native-theoplayer-drm';
ContentProtectionRegistry.registerContentProtectionIntegration(
'ezdrm', // integrationId
'fairplay', // keySystemId
new EzdrmFairplayContentProtectionIntegrationFactory()
);
`
The combination of both integrationId and keySystemId points the player towards the connectorezdrm
for a specific source, in this case the connector for fairplay:
`typescript`
const source = {
"sources": {
"src": "
"contentProtection": {
"integration": "ezdrm",
"fairplay": {
"certificate": "
"licenseAcquisitionURL": "
},
}
}
};
The THEOplayer DRM integrations repository
contains a list of integrations for native Web, Android & iOS THEOplayer SDKs.
As the content protection API of react-native-theoplayer is very similar to that of@theoplayer/react-native-drm
THEOplayer's native Web SDK, the available Web connectors can mostly be reused as-is.
These connectors are not available as npm packages however, and sometimes have dependencies on web-specific
utilities. Because of this, the package providesreact-native-theoplayer`:
the following connectors, readily available to be used by
| Vendor | Widevine | Playready | FairPlay |
|------------------------------|-------------|-------------|----------|
| BuyDRM KeyOS | ✓ | ✓ | ✓ |
| EZDRM | ✓ () | ✓ () | ✓ |
| Verimatrix MultiDRM Core DRM | ✓ | ✓ | ✓ |
| Anvato | ✓ | ✗ | ✓ |
| Axinom | ✓ | ✗ | ✓ |
| CastLabs | ✓ | ✓ | ✓ |
| PallyCon | ✗ | ✗ | ✓ |
(*) No connector is needed for these DRM vendors; it is handled by the player's default DRM flow.