bitmovin-player-react-native 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/bitmovin/player/reactnative/PlayerModule.kt +47 -0
- package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +32 -3
- package/build/adaptationConfig.d.ts +1 -1
- package/build/adaptationConfig.js.map +1 -1
- package/build/advertising.d.ts +54 -1
- package/build/advertising.d.ts.map +1 -1
- package/build/advertising.js.map +1 -1
- package/build/audioSession.d.ts +3 -3
- package/build/audioSession.js +2 -2
- package/build/audioSession.js.map +1 -1
- package/build/bitmovinCastManager.d.ts +3 -3
- package/build/bitmovinCastManager.js +2 -2
- package/build/bitmovinCastManager.js.map +1 -1
- package/build/bufferConfig.d.ts +2 -2
- package/build/bufferConfig.js.map +1 -1
- package/build/components/PlayerView/events.d.ts +16 -16
- package/build/components/PlayerView/events.js.map +1 -1
- package/build/components/PlayerView/nativeEvents.d.ts +16 -16
- package/build/components/PlayerView/nativeEvents.js.map +1 -1
- package/build/components/PlayerView/pictureInPictureConfig.d.ts +1 -1
- package/build/components/PlayerView/pictureInPictureConfig.js.map +1 -1
- package/build/components/PlayerView/playerViewConfig.d.ts +2 -2
- package/build/components/PlayerView/playerViewConfig.js.map +1 -1
- package/build/decoder/decoderConfig.d.ts +2 -2
- package/build/decoder/decoderConfig.js.map +1 -1
- package/build/drm/index.d.ts +2 -2
- package/build/drm/index.js.map +1 -1
- package/build/drm/widevineConfig.d.ts +5 -5
- package/build/drm/widevineConfig.js.map +1 -1
- package/build/events.d.ts +10 -10
- package/build/events.js.map +1 -1
- package/build/media.d.ts +4 -0
- package/build/media.d.ts.map +1 -1
- package/build/media.js.map +1 -1
- package/build/modules/PlayerModule.d.ts +12 -1
- package/build/modules/PlayerModule.d.ts.map +1 -1
- package/build/modules/PlayerModule.js.map +1 -1
- package/build/offline/offlineContentConfig.d.ts +1 -1
- package/build/offline/offlineContentConfig.js.map +1 -1
- package/build/offline/offlineContentManager.d.ts +2 -2
- package/build/offline/offlineContentManager.js +2 -2
- package/build/offline/offlineContentManager.js.map +1 -1
- package/build/offline/offlineContentManagerListener.d.ts +13 -13
- package/build/offline/offlineContentManagerListener.js +1 -1
- package/build/offline/offlineContentManagerListener.js.map +1 -1
- package/build/offline/offlineContentOptions.d.ts +2 -2
- package/build/offline/offlineContentOptions.js.map +1 -1
- package/build/offline/offlineDownloadRequest.d.ts +1 -1
- package/build/offline/offlineDownloadRequest.js.map +1 -1
- package/build/offline/offlineSourceOptions.d.ts +2 -2
- package/build/offline/offlineSourceOptions.js.map +1 -1
- package/build/offline/offlineState.d.ts +1 -1
- package/build/offline/offlineState.js +1 -1
- package/build/offline/offlineState.js.map +1 -1
- package/build/playbackConfig.d.ts +1 -1
- package/build/playbackConfig.js.map +1 -1
- package/build/player.d.ts +13 -11
- package/build/player.d.ts.map +1 -1
- package/build/player.js +42 -11
- package/build/player.js.map +1 -1
- package/build/source.d.ts +2 -2
- package/build/source.js +1 -1
- package/build/source.js.map +1 -1
- package/build/styleConfig.d.ts +5 -5
- package/build/styleConfig.js +1 -1
- package/build/styleConfig.js.map +1 -1
- package/build/subtitleFormat.d.ts +5 -5
- package/build/subtitleFormat.js +5 -5
- package/build/subtitleFormat.js.map +1 -1
- package/build/subtitleTrack.d.ts +1 -1
- package/build/subtitleTrack.js.map +1 -1
- package/build/tweaksConfig.d.ts +15 -15
- package/build/tweaksConfig.js.map +1 -1
- package/ios/FullscreenHandlerModule.swift +26 -3
- package/ios/LockedBox.swift +6 -0
- package/ios/PlayerModule.swift +40 -0
- package/ios/RCTConvert+BitmovinPlayer.swift +41 -0
- package/ios/RNBitmovinPlayer.podspec +1 -1
- package/package.json +1 -1
- package/plugin/build/withBitmovinConfig.js +8 -2
- package/plugin/src/withAppGradleDependencies.ts +24 -21
- package/plugin/src/withBitmovinAndroidConfig.ts +4 -1
- package/plugin/src/withBitmovinConfig.ts +12 -3
- package/plugin/src/withBitmovinIosConfig.ts +4 -1
- package/src/adaptationConfig.ts +1 -1
- package/src/advertising.ts +56 -1
- package/src/audioSession.ts +3 -3
- package/src/bitmovinCastManager.ts +3 -3
- package/src/bufferConfig.ts +2 -2
- package/src/components/PlayerView/events.ts +16 -16
- package/src/components/PlayerView/nativeEvents.ts +16 -16
- package/src/components/PlayerView/pictureInPictureConfig.ts +1 -1
- package/src/components/PlayerView/playerViewConfig.ts +2 -2
- package/src/decoder/decoderConfig.ts +2 -2
- package/src/drm/index.ts +2 -2
- package/src/drm/widevineConfig.ts +5 -5
- package/src/events.ts +10 -10
- package/src/media.ts +4 -0
- package/src/modules/PlayerModule.ts +18 -2
- package/src/offline/offlineContentConfig.ts +1 -1
- package/src/offline/offlineContentManager.ts +2 -2
- package/src/offline/offlineContentManagerListener.ts +13 -13
- package/src/offline/offlineContentOptions.ts +2 -2
- package/src/offline/offlineDownloadRequest.ts +1 -1
- package/src/offline/offlineSourceOptions.ts +2 -2
- package/src/offline/offlineState.ts +1 -1
- package/src/playbackConfig.ts +1 -1
- package/src/player.ts +47 -12
- package/src/source.ts +2 -2
- package/src/styleConfig.ts +5 -5
- package/src/subtitleFormat.ts +5 -5
- package/src/subtitleTrack.ts +1 -1
- package/src/tweaksConfig.ts +15 -15
package/src/audioSession.ts
CHANGED
|
@@ -13,7 +13,7 @@ import AudioSessionModule from './modules/AudioSessionModule';
|
|
|
13
13
|
* - `record`: The category for recording audio while also silencing playback audio.
|
|
14
14
|
* - `soloAmbient`: The default audio session category.
|
|
15
15
|
*
|
|
16
|
-
* @
|
|
16
|
+
* @platform iOS
|
|
17
17
|
* @see https://developer.apple.com/documentation/avfaudio/avaudiosession/category
|
|
18
18
|
*/
|
|
19
19
|
export type AudioSessionCategory =
|
|
@@ -27,14 +27,14 @@ export type AudioSessionCategory =
|
|
|
27
27
|
/**
|
|
28
28
|
* An object that communicates to the system how you intend to use audio in your app.
|
|
29
29
|
*
|
|
30
|
-
* @
|
|
30
|
+
* @platform iOS
|
|
31
31
|
* @see https://developer.apple.com/documentation/avfaudio/avaudiosession
|
|
32
32
|
*/
|
|
33
33
|
export const AudioSession = {
|
|
34
34
|
/**
|
|
35
35
|
* Sets the audio session's category.
|
|
36
36
|
*
|
|
37
|
-
* @
|
|
37
|
+
* @platform iOS
|
|
38
38
|
* @see https://developer.apple.com/documentation/avfaudio/avaudiosession/1616583-setcategory
|
|
39
39
|
*/
|
|
40
40
|
setCategory: async (category: AudioSessionCategory): Promise<void> => {
|
|
@@ -3,7 +3,7 @@ import BitmovinCastManagerModule from './modules/BitmovinCastManagerModule';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The options to be used for initializing `BitmovinCastManager`
|
|
6
|
-
* @
|
|
6
|
+
* @platform Android, iOS
|
|
7
7
|
*/
|
|
8
8
|
export interface BitmovinCastManagerOptions {
|
|
9
9
|
/**
|
|
@@ -23,7 +23,7 @@ export interface BitmovinCastManagerOptions {
|
|
|
23
23
|
* The `BitmovinCastManager` needs to be initialized by calling `BitmovinCastManager.initialize`
|
|
24
24
|
* before `Player` creation to enable casting features.
|
|
25
25
|
*
|
|
26
|
-
* @
|
|
26
|
+
* @platform Android, iOS
|
|
27
27
|
*/
|
|
28
28
|
export const BitmovinCastManager = {
|
|
29
29
|
/**
|
|
@@ -63,7 +63,7 @@ export const BitmovinCastManager = {
|
|
|
63
63
|
* Make sure to call this method on every Android Activity switch.
|
|
64
64
|
*
|
|
65
65
|
* @returns A promise that resolves when the context was updated successfully
|
|
66
|
-
* @
|
|
66
|
+
* @platform Android
|
|
67
67
|
*/
|
|
68
68
|
updateContext: async (): Promise<void> => {
|
|
69
69
|
if (Platform.OS === 'ios') {
|
package/src/bufferConfig.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface BufferConfig {
|
|
|
27
27
|
*
|
|
28
28
|
* Default is `5` seconds.
|
|
29
29
|
*
|
|
30
|
-
* @
|
|
30
|
+
* @platform Android
|
|
31
31
|
*/
|
|
32
32
|
restartThreshold?: number;
|
|
33
33
|
/**
|
|
@@ -36,7 +36,7 @@ export interface BufferConfig {
|
|
|
36
36
|
*
|
|
37
37
|
* Default is `2.5` seconds.
|
|
38
38
|
*
|
|
39
|
-
* @
|
|
39
|
+
* @platform Android
|
|
40
40
|
*/
|
|
41
41
|
startupThreshold?: number;
|
|
42
42
|
}
|
|
@@ -120,56 +120,56 @@ export type PlayerViewEvents = {
|
|
|
120
120
|
/**
|
|
121
121
|
* Event emitted when casting to a cast-compatible device is available.
|
|
122
122
|
*
|
|
123
|
-
* @
|
|
123
|
+
* @platform iOS, Android
|
|
124
124
|
*/
|
|
125
125
|
onCastAvailable?: (event: CastAvailableEvent) => void;
|
|
126
126
|
/**
|
|
127
127
|
* Event emitted when the playback on a cast-compatible device was paused.
|
|
128
128
|
*
|
|
129
|
-
* @
|
|
129
|
+
* @platform iOS, Android
|
|
130
130
|
*/
|
|
131
131
|
onCastPaused?: (event: CastPausedEvent) => void;
|
|
132
132
|
/**
|
|
133
133
|
* Event emitted when the playback on a cast-compatible device has finished.
|
|
134
134
|
*
|
|
135
|
-
* @
|
|
135
|
+
* @platform iOS, Android
|
|
136
136
|
*/
|
|
137
137
|
onCastPlaybackFinished?: (event: CastPlaybackFinishedEvent) => void;
|
|
138
138
|
/**
|
|
139
139
|
* Event emitted when playback on a cast-compatible device has started.
|
|
140
140
|
*
|
|
141
|
-
* @
|
|
141
|
+
* @platform iOS, Android
|
|
142
142
|
*/
|
|
143
143
|
onCastPlaying?: (event: CastPlayingEvent) => void;
|
|
144
144
|
/**
|
|
145
145
|
* Event emitted when the cast app is launched successfully.
|
|
146
146
|
*
|
|
147
|
-
* @
|
|
147
|
+
* @platform iOS, Android
|
|
148
148
|
*/
|
|
149
149
|
onCastStarted?: (event: CastStartedEvent) => void;
|
|
150
150
|
/**
|
|
151
151
|
* Event emitted when casting is initiated, but the user still needs to choose which device should be used.
|
|
152
152
|
*
|
|
153
|
-
* @
|
|
153
|
+
* @platform iOS, Android
|
|
154
154
|
*/
|
|
155
155
|
onCastStart?: (event: CastStartEvent) => void;
|
|
156
156
|
/**
|
|
157
157
|
* Event emitted when casting to a cast-compatible device is stopped.
|
|
158
158
|
*
|
|
159
|
-
* @
|
|
159
|
+
* @platform iOS, Android
|
|
160
160
|
*/
|
|
161
161
|
onCastStopped?: (event: CastStoppedEvent) => void;
|
|
162
162
|
/**
|
|
163
163
|
* Event emitted when the time update from the currently used cast-compatible device is received.
|
|
164
164
|
*
|
|
165
|
-
* @
|
|
165
|
+
* @platform iOS, Android
|
|
166
166
|
*/
|
|
167
167
|
onCastTimeUpdated?: (event: CastTimeUpdatedEvent) => void;
|
|
168
168
|
/**
|
|
169
169
|
* Event emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for
|
|
170
170
|
* playback.
|
|
171
171
|
*
|
|
172
|
-
* @
|
|
172
|
+
* @platform iOS, Android
|
|
173
173
|
*/
|
|
174
174
|
onCastWaitingForDevice?: (event: CastWaitingForDeviceEvent) => void;
|
|
175
175
|
/**
|
|
@@ -195,25 +195,25 @@ export type PlayerViewEvents = {
|
|
|
195
195
|
/**
|
|
196
196
|
* Event emitted when fullscreen mode has been enabled.
|
|
197
197
|
*
|
|
198
|
-
* @
|
|
198
|
+
* @platform iOS, Android
|
|
199
199
|
*/
|
|
200
200
|
onFullscreenEnabled?: (event: FullscreenEnabledEvent) => void;
|
|
201
201
|
/**
|
|
202
202
|
* Event emitted when fullscreen mode has been disabled.
|
|
203
203
|
*
|
|
204
|
-
* @
|
|
204
|
+
* @platform iOS, Android
|
|
205
205
|
*/
|
|
206
206
|
onFullscreenDisabled?: (event: FullscreenDisabledEvent) => void;
|
|
207
207
|
/**
|
|
208
208
|
* Event emitted when fullscreen mode has been entered.
|
|
209
209
|
*
|
|
210
|
-
* @
|
|
210
|
+
* @platform iOS, Android
|
|
211
211
|
*/
|
|
212
212
|
onFullscreenEnter?: (event: FullscreenEnterEvent) => void;
|
|
213
213
|
/**
|
|
214
214
|
* Event emitted when fullscreen mode has been exited.
|
|
215
215
|
*
|
|
216
|
-
* @
|
|
216
|
+
* @platform iOS, Android
|
|
217
217
|
*/
|
|
218
218
|
onFullscreenExit?: (event: FullscreenExitEvent) => void;
|
|
219
219
|
/**
|
|
@@ -237,7 +237,7 @@ export type PlayerViewEvents = {
|
|
|
237
237
|
/**
|
|
238
238
|
* Event emitted when the player entered Picture in Picture mode.
|
|
239
239
|
*
|
|
240
|
-
* @
|
|
240
|
+
* @platform iOS
|
|
241
241
|
*/
|
|
242
242
|
onPictureInPictureEntered?: (event: PictureInPictureEnteredEvent) => void;
|
|
243
243
|
/**
|
|
@@ -247,7 +247,7 @@ export type PlayerViewEvents = {
|
|
|
247
247
|
/**
|
|
248
248
|
* Event emitted when the player exited Picture in Picture mode.
|
|
249
249
|
*
|
|
250
|
-
* @
|
|
250
|
+
* @platform iOS
|
|
251
251
|
*/
|
|
252
252
|
onPictureInPictureExited?: (event: PictureInPictureExitedEvent) => void;
|
|
253
253
|
/**
|
|
@@ -260,7 +260,7 @@ export type PlayerViewEvents = {
|
|
|
260
260
|
onPlaybackFinished?: (event: PlaybackFinishedEvent) => void;
|
|
261
261
|
/**
|
|
262
262
|
* Emitted when the player transitions from one playback speed to another.
|
|
263
|
-
* @
|
|
263
|
+
* @platform iOS, tvOS
|
|
264
264
|
*/
|
|
265
265
|
onPlaybackSpeedChanged?: (event: PlaybackSpeedChangedEvent) => void;
|
|
266
266
|
/**
|
|
@@ -119,19 +119,19 @@ export type NativePlayerViewEvents = {
|
|
|
119
119
|
/**
|
|
120
120
|
* Event emitted when casting to a cast-compatible device is available.
|
|
121
121
|
*
|
|
122
|
-
* @
|
|
122
|
+
* @platform iOS, Android
|
|
123
123
|
*/
|
|
124
124
|
onBmpCastAvailable?: (event: { nativeEvent: CastAvailableEvent }) => void;
|
|
125
125
|
/**
|
|
126
126
|
* Event emitted when the playback on a cast-compatible device was paused.
|
|
127
127
|
*
|
|
128
|
-
* @
|
|
128
|
+
* @platform iOS, Android
|
|
129
129
|
*/
|
|
130
130
|
onBmpCastPaused?: (event: { nativeEvent: CastPausedEvent }) => void;
|
|
131
131
|
/**
|
|
132
132
|
* Event emitted when the playback on a cast-compatible device has finished.
|
|
133
133
|
*
|
|
134
|
-
* @
|
|
134
|
+
* @platform iOS, Android
|
|
135
135
|
*/
|
|
136
136
|
onBmpCastPlaybackFinished?: (event: {
|
|
137
137
|
nativeEvent: CastPlaybackFinishedEvent;
|
|
@@ -139,38 +139,38 @@ export type NativePlayerViewEvents = {
|
|
|
139
139
|
/**
|
|
140
140
|
* Event emitted when playback on a cast-compatible device has started.
|
|
141
141
|
*
|
|
142
|
-
* @
|
|
142
|
+
* @platform iOS, Android
|
|
143
143
|
*/
|
|
144
144
|
onBmpCastPlaying?: (event: { nativeEvent: CastPlayingEvent }) => void;
|
|
145
145
|
/**
|
|
146
146
|
* Event emitted when the cast app is launched successfully.
|
|
147
147
|
*
|
|
148
|
-
* @
|
|
148
|
+
* @platform iOS, Android
|
|
149
149
|
*/
|
|
150
150
|
onBmpCastStarted?: (event: { nativeEvent: CastStartedEvent }) => void;
|
|
151
151
|
/**
|
|
152
152
|
* Event emitted when casting is initiated, but the user still needs to choose which device should be used.
|
|
153
153
|
*
|
|
154
|
-
* @
|
|
154
|
+
* @platform iOS, Android
|
|
155
155
|
*/
|
|
156
156
|
onBmpCastStart?: (event: { nativeEvent: CastStartEvent }) => void;
|
|
157
157
|
/**
|
|
158
158
|
* Event emitted when casting to a cast-compatible device is stopped.
|
|
159
159
|
*
|
|
160
|
-
* @
|
|
160
|
+
* @platform iOS, Android
|
|
161
161
|
*/
|
|
162
162
|
onBmpCastStopped?: (event: { nativeEvent: CastStoppedEvent }) => void;
|
|
163
163
|
/**
|
|
164
164
|
* Event emitted when the time update from the currently used cast-compatible device is received.
|
|
165
165
|
*
|
|
166
|
-
* @
|
|
166
|
+
* @platform iOS, Android
|
|
167
167
|
*/
|
|
168
168
|
onBmpCastTimeUpdated?: (event: { nativeEvent: CastTimeUpdatedEvent }) => void;
|
|
169
169
|
/**
|
|
170
170
|
* Event emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for
|
|
171
171
|
* playback.
|
|
172
172
|
*
|
|
173
|
-
* @
|
|
173
|
+
* @platform iOS, Android
|
|
174
174
|
*/
|
|
175
175
|
onBmpCastWaitingForDevice?: (event: {
|
|
176
176
|
nativeEvent: CastWaitingForDeviceEvent;
|
|
@@ -200,7 +200,7 @@ export type NativePlayerViewEvents = {
|
|
|
200
200
|
/**
|
|
201
201
|
* Event emitted when fullscreen mode has been enabled.
|
|
202
202
|
*
|
|
203
|
-
* @
|
|
203
|
+
* @platform iOS, Android
|
|
204
204
|
*/
|
|
205
205
|
onBmpFullscreenEnabled?: (event: {
|
|
206
206
|
nativeEvent: FullscreenEnabledEvent;
|
|
@@ -208,7 +208,7 @@ export type NativePlayerViewEvents = {
|
|
|
208
208
|
/**
|
|
209
209
|
* Event emitted when fullscreen mode has been disabled.
|
|
210
210
|
*
|
|
211
|
-
* @
|
|
211
|
+
* @platform iOS, Android
|
|
212
212
|
*/
|
|
213
213
|
onBmpFullscreenDisabled?: (event: {
|
|
214
214
|
nativeEvent: FullscreenDisabledEvent;
|
|
@@ -216,13 +216,13 @@ export type NativePlayerViewEvents = {
|
|
|
216
216
|
/**
|
|
217
217
|
* Event emitted when fullscreen mode has been entered.
|
|
218
218
|
*
|
|
219
|
-
* @
|
|
219
|
+
* @platform iOS, Android
|
|
220
220
|
*/
|
|
221
221
|
onBmpFullscreenEnter?: (event: { nativeEvent: FullscreenEnterEvent }) => void;
|
|
222
222
|
/**
|
|
223
223
|
* Event emitted when fullscreen mode has been exited.
|
|
224
224
|
*
|
|
225
|
-
* @
|
|
225
|
+
* @platform iOS, Android
|
|
226
226
|
*/
|
|
227
227
|
onBmpFullscreenExit?: (event: { nativeEvent: FullscreenExitEvent }) => void;
|
|
228
228
|
/**
|
|
@@ -248,7 +248,7 @@ export type NativePlayerViewEvents = {
|
|
|
248
248
|
/**
|
|
249
249
|
* Event emitted when the player entered Picture in Picture mode.
|
|
250
250
|
*
|
|
251
|
-
* @
|
|
251
|
+
* @platform iOS
|
|
252
252
|
*/
|
|
253
253
|
onBmpPictureInPictureEntered?: (event: {
|
|
254
254
|
nativeEvent: PictureInPictureEnteredEvent;
|
|
@@ -262,7 +262,7 @@ export type NativePlayerViewEvents = {
|
|
|
262
262
|
/**
|
|
263
263
|
* Event emitted when the player exited Picture in Picture mode.
|
|
264
264
|
*
|
|
265
|
-
* @
|
|
265
|
+
* @platform iOS
|
|
266
266
|
*/
|
|
267
267
|
onBmpPictureInPictureExited?: (event: {
|
|
268
268
|
nativeEvent: PictureInPictureExitedEvent;
|
|
@@ -279,7 +279,7 @@ export type NativePlayerViewEvents = {
|
|
|
279
279
|
}) => void;
|
|
280
280
|
/**
|
|
281
281
|
* Emitted when the player transitions from one playback speed to another.
|
|
282
|
-
* @
|
|
282
|
+
* @platform iOS, tvOS
|
|
283
283
|
*/
|
|
284
284
|
onBmpPlaybackSpeedChanged?: (event: {
|
|
285
285
|
nativeEvent: PlaybackSpeedChangedEvent;
|
|
@@ -36,7 +36,7 @@ export interface PlayerViewConfig {
|
|
|
36
36
|
*
|
|
37
37
|
* Default is {@link SurfaceType.SurfaceView}.
|
|
38
38
|
*
|
|
39
|
-
* @
|
|
39
|
+
* @platform Android
|
|
40
40
|
*/
|
|
41
41
|
surfaceType?: SurfaceType;
|
|
42
42
|
}
|
|
@@ -67,7 +67,7 @@ export interface WebUiConfig extends UiConfig {
|
|
|
67
67
|
* By default this is enabled only for the TV UI variant, as it's needed there to
|
|
68
68
|
* initiate spatial navigation using the remote control.
|
|
69
69
|
*
|
|
70
|
-
* @
|
|
70
|
+
* @platform Android
|
|
71
71
|
*/
|
|
72
72
|
focusUiOnInitialization?: boolean;
|
|
73
73
|
}
|
|
@@ -3,7 +3,7 @@ import { NativeInstanceConfig } from '../nativeInstance';
|
|
|
3
3
|
/**
|
|
4
4
|
* Configures the playback behaviour of the player.
|
|
5
5
|
*
|
|
6
|
-
* @
|
|
6
|
+
* @platform Android
|
|
7
7
|
*/
|
|
8
8
|
export interface DecoderConfig extends NativeInstanceConfig {
|
|
9
9
|
/**
|
|
@@ -77,7 +77,7 @@ export interface DecoderConfig extends NativeInstanceConfig {
|
|
|
77
77
|
* Can be set on the `DecoderConfig.decoderPriorityProvider` to override the default decoder selection logic.
|
|
78
78
|
* See {@link DecoderConfig#decoderPriorityProvider} for more details
|
|
79
79
|
*
|
|
80
|
-
* @
|
|
80
|
+
* @platform Android
|
|
81
81
|
* */
|
|
82
82
|
export interface DecoderPriorityProvider {
|
|
83
83
|
overrideDecodersPriority: (
|
package/src/drm/index.ts
CHANGED
|
@@ -15,13 +15,13 @@ export interface DrmConfig extends NativeInstanceConfig {
|
|
|
15
15
|
/**
|
|
16
16
|
* FairPlay specific configuration.
|
|
17
17
|
*
|
|
18
|
-
* @
|
|
18
|
+
* @platform iOS
|
|
19
19
|
*/
|
|
20
20
|
fairplay?: FairplayConfig;
|
|
21
21
|
/**
|
|
22
22
|
* Widevine specific configuration.
|
|
23
23
|
*
|
|
24
|
-
* @
|
|
24
|
+
* @platform Android, iOS (only for casting).
|
|
25
25
|
*/
|
|
26
26
|
widevine?: WidevineConfig;
|
|
27
27
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Represents a Widevine Streaming DRM config.
|
|
3
|
-
* @
|
|
3
|
+
* @platform Android, iOS (only for casting).
|
|
4
4
|
*/
|
|
5
5
|
export interface WidevineConfig {
|
|
6
6
|
/**
|
|
@@ -19,7 +19,7 @@ export interface WidevineConfig {
|
|
|
19
19
|
* Note that both the passed `message` data and this block return value should be a Base64 string.
|
|
20
20
|
* So use whatever solution suits you best to handle Base64 in React Native.
|
|
21
21
|
*
|
|
22
|
-
* @
|
|
22
|
+
* @platform Android
|
|
23
23
|
*
|
|
24
24
|
* @param message - Base64 encoded message data.
|
|
25
25
|
* @returns The processed Base64 encoded message.
|
|
@@ -33,7 +33,7 @@ export interface WidevineConfig {
|
|
|
33
33
|
* Note that both the passed `license` data and this block return value should be a Base64 string.
|
|
34
34
|
* So use whatever solution suits you best to handle Base64 in React Native.
|
|
35
35
|
*
|
|
36
|
-
* @
|
|
36
|
+
* @platform Android
|
|
37
37
|
*
|
|
38
38
|
* @param license - Base64 encoded license data.
|
|
39
39
|
* @returns The processed Base64 encoded license.
|
|
@@ -42,7 +42,7 @@ export interface WidevineConfig {
|
|
|
42
42
|
/**
|
|
43
43
|
* Set widevine's preferred security level.
|
|
44
44
|
*
|
|
45
|
-
* @
|
|
45
|
+
* @platform Android
|
|
46
46
|
*/
|
|
47
47
|
preferredSecurityLevel?: string;
|
|
48
48
|
/**
|
|
@@ -51,7 +51,7 @@ export interface WidevineConfig {
|
|
|
51
51
|
* as the same DRM scheme information.
|
|
52
52
|
* Default: `false`
|
|
53
53
|
*
|
|
54
|
-
* @
|
|
54
|
+
* @platform Android
|
|
55
55
|
*/
|
|
56
56
|
shouldKeepDrmSessionsAlive?: boolean;
|
|
57
57
|
}
|
package/src/events.ts
CHANGED
|
@@ -346,63 +346,63 @@ export interface SubtitleChangedEvent extends Event {
|
|
|
346
346
|
/**
|
|
347
347
|
* Emitted when the player enters Picture in Picture mode.
|
|
348
348
|
*
|
|
349
|
-
* @
|
|
349
|
+
* @platform iOS, Android
|
|
350
350
|
*/
|
|
351
351
|
export type PictureInPictureEnterEvent = Event;
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
354
|
* Emitted when the player exits Picture in Picture mode.
|
|
355
355
|
*
|
|
356
|
-
* @
|
|
356
|
+
* @platform iOS, Android
|
|
357
357
|
*/
|
|
358
358
|
export type PictureInPictureExitEvent = Event;
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* Emitted when the player has finished entering Picture in Picture mode on iOS.
|
|
362
362
|
*
|
|
363
|
-
* @
|
|
363
|
+
* @platform iOS
|
|
364
364
|
*/
|
|
365
365
|
export type PictureInPictureEnteredEvent = Event;
|
|
366
366
|
|
|
367
367
|
/**
|
|
368
368
|
* Emitted when the player has finished exiting Picture in Picture mode on iOS.
|
|
369
369
|
*
|
|
370
|
-
* @
|
|
370
|
+
* @platform iOS
|
|
371
371
|
*/
|
|
372
372
|
export type PictureInPictureExitedEvent = Event;
|
|
373
373
|
|
|
374
374
|
/**
|
|
375
375
|
* Emitted when the fullscreen functionality has been enabled.
|
|
376
376
|
*
|
|
377
|
-
* @
|
|
377
|
+
* @platform iOS, Android
|
|
378
378
|
*/
|
|
379
379
|
export type FullscreenEnabledEvent = Event;
|
|
380
380
|
|
|
381
381
|
/**
|
|
382
382
|
* Emitted when the fullscreen functionality has been disabled.
|
|
383
383
|
*
|
|
384
|
-
* @
|
|
384
|
+
* @platform iOS, Android
|
|
385
385
|
*/
|
|
386
386
|
export type FullscreenDisabledEvent = Event;
|
|
387
387
|
|
|
388
388
|
/**
|
|
389
389
|
* Emitted when the player enters fullscreen mode.
|
|
390
390
|
*
|
|
391
|
-
* @
|
|
391
|
+
* @platform iOS, Android
|
|
392
392
|
*/
|
|
393
393
|
export type FullscreenEnterEvent = Event;
|
|
394
394
|
|
|
395
395
|
/**
|
|
396
396
|
* Emitted when the player exits fullscreen mode.
|
|
397
397
|
*
|
|
398
|
-
* @
|
|
398
|
+
* @platform iOS, Android
|
|
399
399
|
*/
|
|
400
400
|
export type FullscreenExitEvent = Event;
|
|
401
401
|
|
|
402
402
|
/**
|
|
403
403
|
* Emitted when the availability of the Picture in Picture mode changed on Android.
|
|
404
404
|
*
|
|
405
|
-
* @
|
|
405
|
+
* @platform Android
|
|
406
406
|
*/
|
|
407
407
|
export interface PictureInPictureAvailabilityChangedEvent extends Event {
|
|
408
408
|
/**
|
|
@@ -710,7 +710,7 @@ export interface DownloadFinishedEvent extends Event {
|
|
|
710
710
|
|
|
711
711
|
/**
|
|
712
712
|
* Emitted when the player transitions from one playback speed to another.
|
|
713
|
-
* @
|
|
713
|
+
* @platform iOS, tvOS
|
|
714
714
|
*/
|
|
715
715
|
export interface PlaybackSpeedChangedEvent extends Event {
|
|
716
716
|
/**
|
package/src/media.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { NativeModule, requireNativeModule } from 'expo-modules-core';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { ImaSettings } from '../advertising';
|
|
3
|
+
|
|
4
|
+
export type PlayerModuleEvents = {
|
|
5
|
+
onImaBeforeInitialization: ({
|
|
6
|
+
nativeId,
|
|
7
|
+
id,
|
|
8
|
+
settings,
|
|
9
|
+
}: {
|
|
10
|
+
nativeId: string;
|
|
11
|
+
id: number;
|
|
12
|
+
settings: ImaSettings;
|
|
13
|
+
}) => void;
|
|
14
|
+
};
|
|
4
15
|
|
|
5
16
|
declare class PlayerModule extends NativeModule<PlayerModuleEvents> {
|
|
6
17
|
/**
|
|
@@ -148,6 +159,11 @@ declare class PlayerModule extends NativeModule<PlayerModuleEvents> {
|
|
|
148
159
|
*/
|
|
149
160
|
skipAd(nativeId: string): Promise<void>;
|
|
150
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Applies the JS-updated IMA settings for a before-initialization callback.
|
|
164
|
+
*/
|
|
165
|
+
setPreparedImaSettings(id: number, settings: ImaSettings): Promise<void>;
|
|
166
|
+
|
|
151
167
|
/**
|
|
152
168
|
* Check if player can play at specified playback speed (iOS only).
|
|
153
169
|
*/
|
|
@@ -45,7 +45,7 @@ const handleBitmovinNativeOfflineEvent = (
|
|
|
45
45
|
* without an active network connection. An OfflineContentManager instance can be created via
|
|
46
46
|
* the constructor and will be idle until initialized.
|
|
47
47
|
*
|
|
48
|
-
* @
|
|
48
|
+
* @platform Android, iOS
|
|
49
49
|
*/
|
|
50
50
|
export class OfflineContentManager extends NativeInstance<OfflineContentConfig> {
|
|
51
51
|
isInitialized = false;
|
|
@@ -193,7 +193,7 @@ export class OfflineContentManager extends NativeInstance<OfflineContentConfig>
|
|
|
193
193
|
* When finished successfully data will be passed to the `OfflineContentManagerListener.onDrmLicenseUpdated`.
|
|
194
194
|
* Errors are transmitted to the `OfflineContentManagerListener.onError`.
|
|
195
195
|
*
|
|
196
|
-
* @
|
|
196
|
+
* @platform Android
|
|
197
197
|
*/
|
|
198
198
|
releaseLicense = async (): Promise<void> => {
|
|
199
199
|
return OfflineModule.releaseLicense(this.nativeId);
|