Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theoplayer/react-native-theoplayer-drm
DRM connectors for react-native-theoplayer
https://github.com/theoplayer/react-native-theoplayer-drm
Last synced: 15 days ago
JSON representation
DRM connectors for react-native-theoplayer
- Host: GitHub
- URL: https://github.com/theoplayer/react-native-theoplayer-drm
- Owner: THEOplayer
- License: mit
- Created: 2023-02-01T09:25:27.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-13T16:00:20.000Z (28 days ago)
- Last Synced: 2024-12-25T04:33:22.671Z (16 days ago)
- Language: TypeScript
- Homepage:
- Size: 846 KB
- Stars: 3
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# React Native THEOplayer DRM
The `@theoplayer/react-native-drm` package provides a set of connectors for [react-native-theoplayer](https://github.com/THEOplayer/react-native-theoplayer),
allowing playback of DRM-protected content.## Installation
```sh
npm install @theoplayer/react-native-drm
```## Usage
The connector needs to be registered to the `ContentProtectionRegistry`, providing both
`integrationId` 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 connector
for a specific source, in this case the `ezdrm` connector for `fairplay`:```typescript
const source = {
"sources": {
"src": "",
"contentProtection": {
"integration": "ezdrm",
"fairplay": {
"certificate": "",
"licenseAcquisitionURL": ""
},
}
}
};
```## Connectors
The [THEOplayer DRM integrations repository](https://github.com/THEOplayer/samples-drm-integration)
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'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 `@theoplayer/react-native-drm` package provides
the following connectors, readily available to be used by `react-native-theoplayer`:| 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.