refactor: move view type and drm in source (#3867)
* perf: ensure we do not provide callback to native if no callback provided from app * chore: rework bufferConfig to make it more generic and reduce ReactExoplayerView code size * chore: improve issue template * fix(android): avoid video view flickering at playback startup * chore(android): refactor DRM props into a dedicated class * Update android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java * chore: fix linter * fix: ensure drm prop is correctly cleaned * feat(android): move viewType (secure texture) & drm inside the source The origianl behavior has been kept for interoperability, but marked as deprecated in doc * chore: fix linter * chore(ios): move drm prop in source like on android * chore: fix linter * chore: clean log * fix: allow to disable secure View * chore: fix viewType resolution (source value was not handled) * chore: use contentDeepEquals instead of manual checks * chore: fix linter * fix: ensure player doesn't start when view is unmounted * Fix/ensure view drop stop playback startup (#3875) * fix: ensure player doesn't start when view is unmounted * chore: revert change * chore: add warning in case of invalid Surface configuration * chore: code clean * fix: simplify surface management * chore: restore previous code * chore: fix typo * chore: code cleanup * feat(android): add multiDrm flag support * docs: update docs * chore: fix ios build * chore: fix deprecated declaration --------- Co-authored-by: Krzysztof Moch <krzysmoch.programs@gmail.com>
This commit is contained in:
@@ -119,6 +119,13 @@ Default: false
|
||||
|
||||
The URL pointing to the licenseServer that will provide the authorization to play the protected stream.
|
||||
|
||||
### `multiDrm`
|
||||
<PlatformsList types={['Android']} />
|
||||
Type: boolean\
|
||||
Default: false
|
||||
|
||||
Indicates that drm system shall support key rotation, see: https://developer.android.google.cn/media/media3/exoplayer/drm?hl=en#key-rotation
|
||||
|
||||
### `type`
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
|
@@ -210,6 +210,9 @@ Determines if the player needs to throw an error when connection is lost or not
|
||||
|
||||
### `drm`
|
||||
|
||||
> [!WARNING]
|
||||
> deprecated, use source.drm instead
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
|
||||
To setup DRM please follow [this guide](/component/drm)
|
||||
@@ -728,6 +731,29 @@ type: 'mpd' }}
|
||||
The following other types are supported on some platforms, but aren't fully documented yet:
|
||||
`content://, ms-appx://, ms-appdata://, assets-library://`
|
||||
|
||||
#### Using DRM content
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
|
||||
To setup DRM please follow [this guide](/component/drm)
|
||||
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
{
|
||||
description: 'WV: Secure SD & HD (cbcs,MP4,H264)',
|
||||
uri: 'https://storage.googleapis.com/wvmedia/cbcs/h264/tears/tears_aes_cbcs.mpd',
|
||||
drm: {
|
||||
type: DRMType.WIDEVINE,
|
||||
licenseServer:
|
||||
'https://proxy.uat.widevine.com/proxy?provider=widevine_test',
|
||||
},
|
||||
},
|
||||
```
|
||||
|
||||
> ⚠️ DRM is not supported on visionOS yet
|
||||
|
||||
|
||||
#### Start playback at a specific point in time
|
||||
|
||||
<PlatformsList types={['Android', 'iOS']} />
|
||||
|
Reference in New Issue
Block a user