bitmovin-player-react-native 1.21.0 → 1.22.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 +98 -87
- package/android/build.gradle +2 -2
- package/build/components/PlayerView/index.d.ts +1 -1
- package/build/components/PlayerView/index.d.ts.map +1 -1
- package/build/components/PlayerView/index.js +11 -3
- package/build/components/PlayerView/index.js.map +1 -1
- package/build/components/PlayerView/properties.d.ts +8 -0
- package/build/components/PlayerView/properties.d.ts.map +1 -1
- package/build/components/PlayerView/properties.js.map +1 -1
- package/ios/RNBitmovinPlayer.podspec +1 -1
- package/package.json +1 -1
- package/src/components/PlayerView/index.tsx +13 -2
- package/src/components/PlayerView/properties.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.22.0] - 2026-07-23
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- `PlayerViewProps.onPlayerViewReady` callback fired once after the player is initialized and the native view is mounted
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Update Bitmovin's native Android SDK version to [`3.159.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31590)
|
|
12
|
+
- Update Bitmovin's native iOS SDK version to [`3.117.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31170)
|
|
13
|
+
|
|
3
14
|
## [1.21.0] - 2026-06-26
|
|
4
15
|
|
|
5
16
|
### Added
|
|
@@ -17,8 +28,8 @@
|
|
|
17
28
|
|
|
18
29
|
### Changed
|
|
19
30
|
|
|
20
|
-
- Update Bitmovin's native Android SDK version to `3.155.1+jason`
|
|
21
|
-
- Update Bitmovin's native iOS SDK version to `3.115.0`
|
|
31
|
+
- Update Bitmovin's native Android SDK version to [`3.155.1+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31551)
|
|
32
|
+
- Update Bitmovin's native iOS SDK version to [`3.115.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31150)
|
|
22
33
|
|
|
23
34
|
## [1.20.1] - 2026-06-12
|
|
24
35
|
|
|
@@ -35,8 +46,8 @@
|
|
|
35
46
|
|
|
36
47
|
### Changed
|
|
37
48
|
|
|
38
|
-
- Update Bitmovin's native Android SDK version to `3.154.0+jason`
|
|
39
|
-
- Update Bitmovin's native iOS SDK version to `3.114.1`
|
|
49
|
+
- Update Bitmovin's native Android SDK version to [`3.154.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31540)
|
|
50
|
+
- Update Bitmovin's native iOS SDK version to [`3.114.1`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31141)
|
|
40
51
|
|
|
41
52
|
### Fixed
|
|
42
53
|
|
|
@@ -50,8 +61,8 @@
|
|
|
50
61
|
|
|
51
62
|
### Changed
|
|
52
63
|
|
|
53
|
-
- Update Bitmovin's native iOS SDK version to `3.113.0`
|
|
54
|
-
- Update Bitmovin's native Android SDK version to `3.152.0+jason`
|
|
64
|
+
- Update Bitmovin's native iOS SDK version to [`3.113.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31130)
|
|
65
|
+
- Update Bitmovin's native Android SDK version to [`3.152.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31520)
|
|
55
66
|
|
|
56
67
|
## [1.18.0] - 2026-05-01
|
|
57
68
|
|
|
@@ -62,8 +73,8 @@
|
|
|
62
73
|
|
|
63
74
|
### Changed
|
|
64
75
|
|
|
65
|
-
- Update Bitmovin's native Android SDK version to `3.151.0+jason`
|
|
66
|
-
- Update Bitmovin's native iOS SDK version to `3.112.0`
|
|
76
|
+
- Update Bitmovin's native Android SDK version to [`3.151.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31510)
|
|
77
|
+
- Update Bitmovin's native iOS SDK version to [`3.112.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31120)
|
|
67
78
|
- Android: Kotlin version to `2.2.20`
|
|
68
79
|
- Update Expo SDK version to `54.0.34`
|
|
69
80
|
|
|
@@ -71,7 +82,7 @@
|
|
|
71
82
|
|
|
72
83
|
### Changed
|
|
73
84
|
|
|
74
|
-
- Update Bitmovin's native Android SDK version to `3.149.0+jason`
|
|
85
|
+
- Update Bitmovin's native Android SDK version to [`3.149.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31490)
|
|
75
86
|
- Update Expo SDK version to `54.0.33` and React Native version to `0.81.5`
|
|
76
87
|
- Minimum supported Expo SDK version is now `54`
|
|
77
88
|
- Minimum supported React Native version is now `0.81.5`
|
|
@@ -85,7 +96,7 @@
|
|
|
85
96
|
### Changed
|
|
86
97
|
|
|
87
98
|
- `DebugConfig.setDebugLoggingEnabled` now also controls JS-side debug logging; `console.log` calls in the `Network` and `Drm` modules are suppressed unless debug logging is enabled
|
|
88
|
-
- Update Bitmovin's native iOS SDK version to `3.111.0`
|
|
99
|
+
- Update Bitmovin's native iOS SDK version to [`3.111.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31110)
|
|
89
100
|
|
|
90
101
|
### Fixed
|
|
91
102
|
|
|
@@ -101,7 +112,7 @@
|
|
|
101
112
|
|
|
102
113
|
### Changed
|
|
103
114
|
|
|
104
|
-
- Update Bitmovin's native iOS SDK version to `3.110.0`
|
|
115
|
+
- Update Bitmovin's native iOS SDK version to [`3.110.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31100)
|
|
105
116
|
|
|
106
117
|
### Fixed
|
|
107
118
|
|
|
@@ -115,14 +126,14 @@
|
|
|
115
126
|
|
|
116
127
|
### Changed
|
|
117
128
|
|
|
118
|
-
- Update Bitmovin's native iOS SDK version to `3.109.0`
|
|
119
|
-
- Update Bitmovin's native Android SDK version to `3.146.0+jason`
|
|
129
|
+
- Update Bitmovin's native iOS SDK version to [`3.109.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31090)
|
|
130
|
+
- Update Bitmovin's native Android SDK version to [`3.146.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31460)
|
|
120
131
|
|
|
121
132
|
## [1.13.0] - 2026-03-13
|
|
122
133
|
|
|
123
134
|
### Changed
|
|
124
135
|
|
|
125
|
-
- Update Bitmovin's native Android SDK version to `3.145.0+jason`
|
|
136
|
+
- Update Bitmovin's native Android SDK version to [`3.145.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31450)
|
|
126
137
|
|
|
127
138
|
## [1.12.0] - 2026-03-13
|
|
128
139
|
|
|
@@ -134,15 +145,15 @@
|
|
|
134
145
|
|
|
135
146
|
### Changed
|
|
136
147
|
|
|
137
|
-
- Update Bitmovin's native Android SDK version to `3.144.0+jason`
|
|
148
|
+
- Update Bitmovin's native Android SDK version to [`3.144.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31440)
|
|
138
149
|
- Update Expo SDK version to `53.0.27`
|
|
139
150
|
|
|
140
151
|
## [1.10.0] - 2026-02-27
|
|
141
152
|
|
|
142
153
|
### Changed
|
|
143
154
|
|
|
144
|
-
- Update Bitmovin's native iOS SDK version to `3.108.1`
|
|
145
|
-
- Update Bitmovin's native Android SDK version to `3.143.0+jason`
|
|
155
|
+
- Update Bitmovin's native iOS SDK version to [`3.108.1`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31081)
|
|
156
|
+
- Update Bitmovin's native Android SDK version to [`3.143.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31430)
|
|
146
157
|
- Update Expo SDK version to `53.0.26`
|
|
147
158
|
|
|
148
159
|
### Fixed
|
|
@@ -172,8 +183,8 @@
|
|
|
172
183
|
- If you have no UI customizations, no action is required; the new UI is used automatically
|
|
173
184
|
- If you ship a custom v3 bundle (even if it still uses the legacy v3 factory names), [migrate to UI v4](https://developer.bitmovin.com/playback/reference/migration-guide-v3-to-v4) or set a legacy factory explicitly via `new CustomUi('<legacy UIFactory function>')` and keep loading the v3 bundle
|
|
174
185
|
- iOS: When re-attaching a different Player to an existing PlayerView, fullscreen and Picture-in-Picture are exited before the swap
|
|
175
|
-
- Update Bitmovin's native iOS SDK version to `3.107.0`
|
|
176
|
-
- Update Bitmovin's native Android SDK version to `3.141.0+jason`
|
|
186
|
+
- Update Bitmovin's native iOS SDK version to [`3.107.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31070)
|
|
187
|
+
- Update Bitmovin's native Android SDK version to [`3.141.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31410)
|
|
177
188
|
|
|
178
189
|
### Fixed
|
|
179
190
|
|
|
@@ -185,8 +196,8 @@
|
|
|
185
196
|
|
|
186
197
|
### Changed
|
|
187
198
|
|
|
188
|
-
- Update Bitmovin's native Android SDK version to `3.140.1+jason`
|
|
189
|
-
- Update Bitmovin's native iOS SDK version to `3.106.0`
|
|
199
|
+
- Update Bitmovin's native Android SDK version to [`3.140.1+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31401)
|
|
200
|
+
- Update Bitmovin's native iOS SDK version to [`3.106.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31060)
|
|
190
201
|
- iOS: `appId` property from Expo config `Features.googleCastSDK.ios` object is now used to initialize Cast receiver application ID
|
|
191
202
|
|
|
192
203
|
### Fixed
|
|
@@ -207,9 +218,9 @@
|
|
|
207
218
|
|
|
208
219
|
### Changed
|
|
209
220
|
|
|
210
|
-
- Update Bitmovin's native Android SDK version to `3.138.0+jason`
|
|
221
|
+
- Update Bitmovin's native Android SDK version to [`3.138.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31380)
|
|
211
222
|
- Update IMA SDK dependency on Android to `3.38.0`
|
|
212
|
-
- Update Bitmovin's native iOS SDK version to `3.105.0`
|
|
223
|
+
- Update Bitmovin's native iOS SDK version to [`3.105.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31050)
|
|
213
224
|
- Update the Google Cast iOS Sender SDK used by the example app to `4.8.4`
|
|
214
225
|
|
|
215
226
|
## [1.6.0] - 2025-12-11
|
|
@@ -221,7 +232,7 @@
|
|
|
221
232
|
|
|
222
233
|
### Changed
|
|
223
234
|
|
|
224
|
-
- Update Bitmovin's native Android SDK version to `3.135.0+jason`
|
|
235
|
+
- Update Bitmovin's native Android SDK version to [`3.135.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31350)
|
|
225
236
|
|
|
226
237
|
## [1.5.0] - 2025-12-05
|
|
227
238
|
|
|
@@ -235,8 +246,8 @@
|
|
|
235
246
|
|
|
236
247
|
### Changed
|
|
237
248
|
|
|
238
|
-
- Update Bitmovin's native Android SDK version to `3.134.0+jason`
|
|
239
|
-
- Update Bitmovin's native iOS SDK version to `3.102.0`
|
|
249
|
+
- Update Bitmovin's native Android SDK version to [`3.134.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31340)
|
|
250
|
+
- Update Bitmovin's native iOS SDK version to [`3.102.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#31020)
|
|
240
251
|
- When no subtitle is selected on iOS/tvOS, it returns `null` instead of a track with identifier `off` to align with the Android Player SDK behavior
|
|
241
252
|
- `SubtitleChangedEvent`'s properties of `oldSubtitleTrack` and `newSubtitleTrack` are now optional to align with the native Player SDKs
|
|
242
253
|
|
|
@@ -249,8 +260,8 @@
|
|
|
249
260
|
|
|
250
261
|
### Changed
|
|
251
262
|
|
|
252
|
-
- Update Bitmovin's native Android SDK version to `3.132.1+jason`
|
|
253
|
-
- Update Bitmovin's native iOS SDK version to `3.98.0`
|
|
263
|
+
- Update Bitmovin's native Android SDK version to [`3.132.1+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31321)
|
|
264
|
+
- Update Bitmovin's native iOS SDK version to [`3.98.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3980)
|
|
254
265
|
|
|
255
266
|
### Fixed
|
|
256
267
|
|
|
@@ -273,7 +284,7 @@
|
|
|
273
284
|
|
|
274
285
|
### Changed
|
|
275
286
|
|
|
276
|
-
- Update Bitmovin's native Android SDK version to `3.131.0+jason`
|
|
287
|
+
- Update Bitmovin's native Android SDK version to [`3.131.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31310)
|
|
277
288
|
|
|
278
289
|
### Fixed
|
|
279
290
|
|
|
@@ -283,8 +294,8 @@
|
|
|
283
294
|
|
|
284
295
|
### Changed
|
|
285
296
|
|
|
286
|
-
- Update Bitmovin's native iOS SDK version to `3.97.2`
|
|
287
|
-
- Update Bitmovin's native Android SDK version to `3.128.0+jason`
|
|
297
|
+
- Update Bitmovin's native iOS SDK version to [`3.97.2`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3972)
|
|
298
|
+
- Update Bitmovin's native Android SDK version to [`3.128.0+jason`](https://developer.bitmovin.com/playback/docs/release-notes-android#31280)
|
|
288
299
|
- Update IMA SDK dependency on iOS to `3.26.1`
|
|
289
300
|
- Update IMA SDK dependency on tvOS to `4.15.1`
|
|
290
301
|
- Update IMA SDK dependency on Android to `3.37.0`
|
|
@@ -293,8 +304,8 @@
|
|
|
293
304
|
|
|
294
305
|
### Changed
|
|
295
306
|
|
|
296
|
-
- Update Bitmovin's native Android SDK version to `3.123.0`
|
|
297
|
-
- Update Bitmovin's native iOS SDK version to `3.94.1`
|
|
307
|
+
- Update Bitmovin's native Android SDK version to [`3.123.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#31230)
|
|
308
|
+
- Update Bitmovin's native iOS SDK version to [`3.94.1`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3941)
|
|
298
309
|
|
|
299
310
|
### Fixed
|
|
300
311
|
|
|
@@ -324,8 +335,8 @@
|
|
|
324
335
|
|
|
325
336
|
### Changed
|
|
326
337
|
|
|
327
|
-
- Update Bitmovin's native Android SDK version to `3.118.0`
|
|
328
|
-
- Update Bitmovin's native iOS SDK version to `3.93.0`
|
|
338
|
+
- Update Bitmovin's native Android SDK version to [`3.118.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#31180)
|
|
339
|
+
- Update Bitmovin's native iOS SDK version to [`3.93.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3930)
|
|
329
340
|
- Android: Add null safety checks to `ReadableMap`/`ReadableArray` calls in `JsonConverter`
|
|
330
341
|
|
|
331
342
|
### Removed
|
|
@@ -340,15 +351,15 @@
|
|
|
340
351
|
|
|
341
352
|
### Changed
|
|
342
353
|
|
|
343
|
-
- Update Bitmovin's native Android SDK version to `3.115.0`
|
|
344
|
-
- Update Bitmovin's native iOS SDK version to `3.92.0`
|
|
354
|
+
- Update Bitmovin's native Android SDK version to [`3.115.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#31150)
|
|
355
|
+
- Update Bitmovin's native iOS SDK version to [`3.92.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3920)
|
|
345
356
|
|
|
346
357
|
## [0.42.0] - 2025-06-02
|
|
347
358
|
|
|
348
359
|
### Changed
|
|
349
360
|
|
|
350
|
-
- Update Bitmovin's native Android SDK version to `3.112.0`
|
|
351
|
-
- Update Bitmovin's native iOS SDK version to `3.90.0`
|
|
361
|
+
- Update Bitmovin's native Android SDK version to [`3.112.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#31120)
|
|
362
|
+
- Update Bitmovin's native iOS SDK version to [`3.90.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3900)
|
|
352
363
|
|
|
353
364
|
### Added
|
|
354
365
|
|
|
@@ -372,8 +383,8 @@
|
|
|
372
383
|
|
|
373
384
|
### Changed
|
|
374
385
|
|
|
375
|
-
- Update Bitmovin's native Android SDK version to `3.104.2`
|
|
376
|
-
- Update Bitmovin's native iOS SDK version to `3.85.2`
|
|
386
|
+
- Update Bitmovin's native Android SDK version to [`3.104.2`](https://developer.bitmovin.com/playback/docs/release-notes-android#31042)
|
|
387
|
+
- Update Bitmovin's native iOS SDK version to [`3.85.2`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3852)
|
|
377
388
|
|
|
378
389
|
## [0.39.0] - 2025-03-07
|
|
379
390
|
|
|
@@ -385,8 +396,8 @@
|
|
|
385
396
|
|
|
386
397
|
### Changed
|
|
387
398
|
|
|
388
|
-
- Update Bitmovin's native Android SDK version to `3.104.1`
|
|
389
|
-
- Update Bitmovin's native iOS SDK version to `3.85.0`
|
|
399
|
+
- Update Bitmovin's native Android SDK version to [`3.104.1`](https://developer.bitmovin.com/playback/docs/release-notes-android#31041)
|
|
400
|
+
- Update Bitmovin's native iOS SDK version to [`3.85.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3850)
|
|
390
401
|
|
|
391
402
|
## [0.37.0] - 2025-01-17
|
|
392
403
|
|
|
@@ -398,7 +409,7 @@
|
|
|
398
409
|
|
|
399
410
|
### Changed
|
|
400
411
|
|
|
401
|
-
- Update Bitmovin's native iOS SDK version to `3.80.0`
|
|
412
|
+
- Update Bitmovin's native iOS SDK version to [`3.80.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3800)
|
|
402
413
|
|
|
403
414
|
### Added
|
|
404
415
|
|
|
@@ -408,8 +419,8 @@
|
|
|
408
419
|
|
|
409
420
|
### Changed
|
|
410
421
|
|
|
411
|
-
- Update Bitmovin's native Android SDK version to `3.98.0`
|
|
412
|
-
- Update Bitmovin's native iOS SDK version to `3.79.0`
|
|
422
|
+
- Update Bitmovin's native Android SDK version to [`3.98.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3980)
|
|
423
|
+
- Update Bitmovin's native iOS SDK version to [`3.79.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3790)
|
|
413
424
|
|
|
414
425
|
### Fixed
|
|
415
426
|
|
|
@@ -419,7 +430,7 @@
|
|
|
419
430
|
|
|
420
431
|
### Changed
|
|
421
432
|
|
|
422
|
-
- Update Bitmovin's native Android SDK version to `3.96.0`
|
|
433
|
+
- Update Bitmovin's native Android SDK version to [`3.96.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3960)
|
|
423
434
|
|
|
424
435
|
## [0.33.0] - 2024-11-28
|
|
425
436
|
|
|
@@ -430,14 +441,14 @@
|
|
|
430
441
|
|
|
431
442
|
### Changed
|
|
432
443
|
|
|
433
|
-
- Update Bitmovin's native iOS SDK version to `3.78.0`
|
|
434
|
-
- Update Bitmovin's native Android SDK version to `3.94.0`
|
|
444
|
+
- Update Bitmovin's native iOS SDK version to [`3.78.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3780)
|
|
445
|
+
- Update Bitmovin's native Android SDK version to [`3.94.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3940)
|
|
435
446
|
|
|
436
447
|
## [0.32.0] - 2024-11-14
|
|
437
448
|
|
|
438
449
|
### Changed
|
|
439
450
|
|
|
440
|
-
- Update Bitmovin's native Android SDK version to `3.92.0`
|
|
451
|
+
- Update Bitmovin's native Android SDK version to [`3.92.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3920)
|
|
441
452
|
|
|
442
453
|
### Fixed
|
|
443
454
|
|
|
@@ -453,7 +464,7 @@
|
|
|
453
464
|
|
|
454
465
|
### Changed
|
|
455
466
|
|
|
456
|
-
- Update Bitmovin's native Android SDK version to `3.91.0`
|
|
467
|
+
- Update Bitmovin's native Android SDK version to [`3.91.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3910)
|
|
457
468
|
|
|
458
469
|
### Deprecated
|
|
459
470
|
|
|
@@ -463,8 +474,8 @@
|
|
|
463
474
|
|
|
464
475
|
### Changed
|
|
465
476
|
|
|
466
|
-
- Update Bitmovin's native Android SDK version to `3.90.0`
|
|
467
|
-
- Update Bitmovin's native iOS SDK version to `3.77.0`
|
|
477
|
+
- Update Bitmovin's native Android SDK version to [`3.90.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3900)
|
|
478
|
+
- Update Bitmovin's native iOS SDK version to [`3.77.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3770)
|
|
468
479
|
|
|
469
480
|
### Added
|
|
470
481
|
|
|
@@ -482,8 +493,8 @@
|
|
|
482
493
|
|
|
483
494
|
### Changed
|
|
484
495
|
|
|
485
|
-
- Update Bitmovin's native Android SDK version to `3.82.0`
|
|
486
|
-
- Update Bitmovin's native iOS SDK version to `3.71.0`
|
|
496
|
+
- Update Bitmovin's native Android SDK version to [`3.82.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3820)
|
|
497
|
+
- Update Bitmovin's native iOS SDK version to [`3.71.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3710)
|
|
487
498
|
- Update IMA SDK dependency on Android to `3.33.0`
|
|
488
499
|
|
|
489
500
|
### Changed
|
|
@@ -496,8 +507,8 @@
|
|
|
496
507
|
|
|
497
508
|
### Changed
|
|
498
509
|
|
|
499
|
-
- Update Bitmovin's native Android SDK version to `3.78.0`
|
|
500
|
-
- Update Bitmovin's native iOS SDK version to `3.67.0`
|
|
510
|
+
- Update Bitmovin's native Android SDK version to [`3.78.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3780)
|
|
511
|
+
- Update Bitmovin's native iOS SDK version to [`3.67.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3670)
|
|
501
512
|
|
|
502
513
|
## [0.27.1] - 2024-07-05
|
|
503
514
|
|
|
@@ -512,8 +523,8 @@
|
|
|
512
523
|
|
|
513
524
|
- Update Google IMA SDK dependencies to `3.23.0` for iOS, and to `4.13.0` for tvOS
|
|
514
525
|
- Update example app dependency: Google Cast iOS sender SDK to `4.8.1`
|
|
515
|
-
- Update Bitmovin's native Android SDK version to `3.74.0`
|
|
516
|
-
- Update Bitmovin's native iOS SDK version to `3.66.0`
|
|
526
|
+
- Update Bitmovin's native Android SDK version to [`3.74.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3740)
|
|
527
|
+
- Update Bitmovin's native iOS SDK version to [`3.66.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3660)
|
|
517
528
|
|
|
518
529
|
## [0.26.0] - 2024-06-14
|
|
519
530
|
|
|
@@ -523,8 +534,8 @@
|
|
|
523
534
|
|
|
524
535
|
### Changed
|
|
525
536
|
|
|
526
|
-
- Update Bitmovin's native Android SDK version to `3.73.0`
|
|
527
|
-
- Update Bitmovin's native iOS SDK version to `3.65.0`
|
|
537
|
+
- Update Bitmovin's native Android SDK version to [`3.73.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3730)
|
|
538
|
+
- Update Bitmovin's native iOS SDK version to [`3.65.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3650)
|
|
528
539
|
|
|
529
540
|
### Fixed
|
|
530
541
|
|
|
@@ -550,8 +561,8 @@
|
|
|
550
561
|
|
|
551
562
|
### Changed
|
|
552
563
|
|
|
553
|
-
- Update Bitmovin's native Android SDK version to `3.72.0`
|
|
554
|
-
- Update Bitmovin's native iOS SDK version to `3.64.0`
|
|
564
|
+
- Update Bitmovin's native Android SDK version to [`3.72.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3720)
|
|
565
|
+
- Update Bitmovin's native iOS SDK version to [`3.64.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3640)
|
|
555
566
|
|
|
556
567
|
### Fixed
|
|
557
568
|
|
|
@@ -562,8 +573,8 @@
|
|
|
562
573
|
|
|
563
574
|
### Changed
|
|
564
575
|
|
|
565
|
-
- Update Bitmovin's native Android SDK version to `3.68.0`
|
|
566
|
-
- Update Bitmovin's native iOS SDK version to `3.62.0`
|
|
576
|
+
- Update Bitmovin's native Android SDK version to [`3.68.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3680)
|
|
577
|
+
- Update Bitmovin's native iOS SDK version to [`3.62.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3620)
|
|
567
578
|
|
|
568
579
|
### Fixed
|
|
569
580
|
|
|
@@ -577,7 +588,7 @@
|
|
|
577
588
|
|
|
578
589
|
### Changed
|
|
579
590
|
|
|
580
|
-
- Update Bitmovin's native iOS SDK version to `3.60.0`
|
|
591
|
+
- Update Bitmovin's native iOS SDK version to [`3.60.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3600)
|
|
581
592
|
- Update IMA SDK dependency on iOS to `3.19.1`, respectively `4.9.2` for tvOS
|
|
582
593
|
|
|
583
594
|
## [0.21.0] - 2024-04-08
|
|
@@ -590,8 +601,8 @@
|
|
|
590
601
|
### Changed
|
|
591
602
|
|
|
592
603
|
- Android: Default Picture-in-Picture implementation doesn't automatically hide/show the Toolbar anymore. This should be handled by the app itself, check out the sample app for an example implementation
|
|
593
|
-
- Update Bitmovin's native Android SDK version to `3.65.0`
|
|
594
|
-
- Update Bitmovin's native iOS SDK version to `3.59.0`
|
|
604
|
+
- Update Bitmovin's native Android SDK version to [`3.65.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3650)
|
|
605
|
+
- Update Bitmovin's native iOS SDK version to [`3.59.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3590)
|
|
595
606
|
|
|
596
607
|
## [0.20.0] - 2024-03-29
|
|
597
608
|
|
|
@@ -602,7 +613,7 @@
|
|
|
602
613
|
|
|
603
614
|
### Changed
|
|
604
615
|
|
|
605
|
-
- Update Bitmovin's native Android SDK version to `3.64.0`
|
|
616
|
+
- Update Bitmovin's native Android SDK version to [`3.64.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3640)
|
|
606
617
|
|
|
607
618
|
## [0.19.0] - 2024-03-22
|
|
608
619
|
|
|
@@ -612,8 +623,8 @@
|
|
|
612
623
|
|
|
613
624
|
### Changed
|
|
614
625
|
|
|
615
|
-
- Update Bitmovin's native Android SDK version to `3.63.0`
|
|
616
|
-
- Update Bitmovin's native iOS SDK version to `3.57.2`
|
|
626
|
+
- Update Bitmovin's native Android SDK version to [`3.63.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3630)
|
|
627
|
+
- Update Bitmovin's native iOS SDK version to [`3.57.2`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3572)
|
|
617
628
|
|
|
618
629
|
### Fixed
|
|
619
630
|
|
|
@@ -624,8 +635,8 @@
|
|
|
624
635
|
### Changed
|
|
625
636
|
|
|
626
637
|
- React Native version to `0.73.4`
|
|
627
|
-
- Update Bitmovin's native Android SDK version to `3.61.0`
|
|
628
|
-
- Update Bitmovin's native iOS SDK version to `3.56.3`
|
|
638
|
+
- Update Bitmovin's native Android SDK version to [`3.61.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3610)
|
|
639
|
+
- Update Bitmovin's native iOS SDK version to [`3.56.3`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3563)
|
|
629
640
|
|
|
630
641
|
### Fixed
|
|
631
642
|
|
|
@@ -639,7 +650,7 @@
|
|
|
639
650
|
|
|
640
651
|
### Changed
|
|
641
652
|
|
|
642
|
-
- Update Bitmovin's native iOS SDK version to `3.55.0`
|
|
653
|
+
- Update Bitmovin's native iOS SDK version to [`3.55.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3550)
|
|
643
654
|
|
|
644
655
|
### Fixed
|
|
645
656
|
|
|
@@ -649,7 +660,7 @@
|
|
|
649
660
|
|
|
650
661
|
### Changed
|
|
651
662
|
|
|
652
|
-
- Update Bitmovin's native Android SDK version to `3.56.0`
|
|
663
|
+
- Update Bitmovin's native Android SDK version to [`3.56.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3560)
|
|
653
664
|
- Android: Kotlin version to `1.9.21`
|
|
654
665
|
|
|
655
666
|
## [0.15.0] - 2023-12-18
|
|
@@ -662,7 +673,7 @@
|
|
|
662
673
|
|
|
663
674
|
- React Native version to `0.72.6`
|
|
664
675
|
- React Native peer dependency version to `0.65.0+`
|
|
665
|
-
- Update Bitmovin's native Android SDK version to `3.54.0`
|
|
676
|
+
- Update Bitmovin's native Android SDK version to [`3.54.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3540)
|
|
666
677
|
- Android: Kotlin version to `1.8.20`
|
|
667
678
|
|
|
668
679
|
## [0.14.2] - 2023-11-27
|
|
@@ -714,7 +725,7 @@
|
|
|
714
725
|
### Changed
|
|
715
726
|
|
|
716
727
|
- Update IMA SDK dependency on Android to `3.31.0`
|
|
717
|
-
- Update Bitmovin's native Android SDK version to `3.47.0`
|
|
728
|
+
- Update Bitmovin's native Android SDK version to [`3.47.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3470)
|
|
718
729
|
|
|
719
730
|
### Deprecated
|
|
720
731
|
|
|
@@ -733,7 +744,7 @@
|
|
|
733
744
|
|
|
734
745
|
- `AnalyticsConfig` properties to match the Bitmovin analytics v3 API
|
|
735
746
|
- Use `jason` build of Bitmovin's native Android SDK
|
|
736
|
-
- Update Bitmovin's native Android SDK version to `3.44.0`
|
|
747
|
+
- Update Bitmovin's native Android SDK version to [`3.44.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3440)
|
|
737
748
|
|
|
738
749
|
### Removed
|
|
739
750
|
|
|
@@ -750,7 +761,7 @@
|
|
|
750
761
|
|
|
751
762
|
### Changed
|
|
752
763
|
|
|
753
|
-
- Update Bitmovin's native Android SDK version to `3.43.0`
|
|
764
|
+
- Update Bitmovin's native Android SDK version to [`3.43.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3430)
|
|
754
765
|
|
|
755
766
|
## [0.10.0] - 2023-09-04
|
|
756
767
|
|
|
@@ -765,7 +776,7 @@
|
|
|
765
776
|
|
|
766
777
|
### Changed
|
|
767
778
|
|
|
768
|
-
- Update Bitmovin's native iOS SDK version to `3.43.1`
|
|
779
|
+
- Update Bitmovin's native iOS SDK version to [`3.43.1`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3431)
|
|
769
780
|
|
|
770
781
|
## [0.9.1] - 2023-08-17
|
|
771
782
|
|
|
@@ -783,7 +794,7 @@
|
|
|
783
794
|
|
|
784
795
|
### Changed
|
|
785
796
|
|
|
786
|
-
- Update Bitmovin's native iOS SDK version to `3.42.0`
|
|
797
|
+
- Update Bitmovin's native iOS SDK version to [`3.42.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3420)
|
|
787
798
|
|
|
788
799
|
### Fixed
|
|
789
800
|
|
|
@@ -797,8 +808,8 @@
|
|
|
797
808
|
|
|
798
809
|
### Changed
|
|
799
810
|
|
|
800
|
-
- Update Bitmovin's native iOS SDK version to `3.41.2`
|
|
801
|
-
- Update Bitmovin's native Android SDK version to `3.40.0`
|
|
811
|
+
- Update Bitmovin's native iOS SDK version to [`3.41.2`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3412)
|
|
812
|
+
- Update Bitmovin's native Android SDK version to [`3.40.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3400)
|
|
802
813
|
- Update IMA SDK dependency on iOS to `3.18.4`, respectively `4.8.2` for tvOS
|
|
803
814
|
- Update IMA SDK dependency on Android to `3.29.0`
|
|
804
815
|
|
|
@@ -843,8 +854,8 @@
|
|
|
843
854
|
|
|
844
855
|
### Changed
|
|
845
856
|
|
|
846
|
-
- Update Bitmovin's native iOS SDK version to `v3.36.0
|
|
847
|
-
- Update Bitmovin's native Android SDK version to `v3.35.0
|
|
857
|
+
- Update Bitmovin's native iOS SDK version to [`v3.36.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3360).
|
|
858
|
+
- Update Bitmovin's native Android SDK version to [`v3.35.0`](https://developer.bitmovin.com/playback/docs/release-notes-android#3350).
|
|
848
859
|
|
|
849
860
|
## [0.5.1] - 2023-01-23
|
|
850
861
|
|
|
@@ -890,8 +901,8 @@ Adds support for tvOS projects and ability to customize the default playback beh
|
|
|
890
901
|
|
|
891
902
|
### Changed
|
|
892
903
|
|
|
893
|
-
- Update Bitmovin's native iOS SDK version to `v3.28.0
|
|
894
|
-
- Update Bitmovin's native Android SDK version to `v3.24.2
|
|
904
|
+
- Update Bitmovin's native iOS SDK version to [`v3.28.0`](https://developer.bitmovin.com/playback/docs/release-notes-ios#3280).
|
|
905
|
+
- Update Bitmovin's native Android SDK version to [`v3.24.2`](https://developer.bitmovin.com/playback/docs/release-notes-android#3242).
|
|
895
906
|
- Setup a new tvOS target on example app's `.xcodeproj` file.
|
|
896
907
|
- Replace `react-native` with `react-native-tvos` on the example app.
|
|
897
908
|
|
package/android/build.gradle
CHANGED
|
@@ -108,6 +108,6 @@ dependencies {
|
|
|
108
108
|
|
|
109
109
|
// Bitmovin
|
|
110
110
|
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
|
|
111
|
-
implementation 'com.bitmovin.player:player:3.
|
|
112
|
-
implementation 'com.bitmovin.player:player-media-session:3.
|
|
111
|
+
implementation 'com.bitmovin.player:player:3.159.0+jason'
|
|
112
|
+
implementation 'com.bitmovin.player:player-media-session:3.159.0+jason'
|
|
113
113
|
}
|
|
@@ -6,5 +6,5 @@ import { PlayerViewProps } from './properties';
|
|
|
6
6
|
*
|
|
7
7
|
* @param options configuration options
|
|
8
8
|
*/
|
|
9
|
-
export declare function PlayerView({ viewRef, style, player, config, fullscreenHandler, customMessageHandler, isFullscreenRequested, scalingMode, isPictureInPictureRequested, pictureInPictureActions, isPictureInPictureEnabled, ...props }: PlayerViewProps): React.JSX.Element | null;
|
|
9
|
+
export declare function PlayerView({ viewRef, style, player, config, fullscreenHandler, customMessageHandler, isFullscreenRequested, scalingMode, isPictureInPictureRequested, pictureInPictureActions, isPictureInPictureEnabled, onPlayerViewReady, ...props }: PlayerViewProps): React.JSX.Element | null;
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PlayerView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAOtE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAa/C;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,oBAAoB,EACpB,qBAA6B,EAC7B,WAAW,EACX,2BAAmC,EACnC,uBAAuB,EACvB,yBAAyB,EACzB,GAAG,KAAK,EACT,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PlayerView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAOtE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAa/C;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,oBAAoB,EACpB,qBAA6B,EAC7B,WAAW,EACX,2BAAmC,EACnC,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,eAAe,4BA+LjB"}
|
|
@@ -20,7 +20,7 @@ const styles = StyleSheet.create({
|
|
|
20
20
|
*
|
|
21
21
|
* @param options configuration options
|
|
22
22
|
*/
|
|
23
|
-
export function PlayerView({ viewRef, style, player, config, fullscreenHandler, customMessageHandler, isFullscreenRequested = false, scalingMode, isPictureInPictureRequested = false, pictureInPictureActions, isPictureInPictureEnabled, ...props }) {
|
|
23
|
+
export function PlayerView({ viewRef, style, player, config, fullscreenHandler, customMessageHandler, isFullscreenRequested = false, scalingMode, isPictureInPictureRequested = false, pictureInPictureActions, isPictureInPictureEnabled, onPlayerViewReady, ...props }) {
|
|
24
24
|
// Keep the device awake while the PlayerView is mounted
|
|
25
25
|
useKeepAwake();
|
|
26
26
|
const nativeView = useRef(viewRef?.current || null);
|
|
@@ -51,6 +51,7 @@ export function PlayerView({ viewRef, style, player, config, fullscreenHandler,
|
|
|
51
51
|
playerViewConfig: config,
|
|
52
52
|
};
|
|
53
53
|
const [isPlayerInitialized, setIsPlayerInitialized] = useState(false);
|
|
54
|
+
const didNotifyPlayerViewReady = useRef(false);
|
|
54
55
|
useEffect(() => {
|
|
55
56
|
void player.initialize().then(() => {
|
|
56
57
|
setIsPlayerInitialized(true);
|
|
@@ -64,10 +65,17 @@ export function PlayerView({ viewRef, style, player, config, fullscreenHandler,
|
|
|
64
65
|
};
|
|
65
66
|
}, [player, fullscreenBridge, customMessageHandlerBridge]);
|
|
66
67
|
useEffect(() => {
|
|
67
|
-
if (isPlayerInitialized
|
|
68
|
+
if (!isPlayerInitialized || !nativeView.current) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (viewRef) {
|
|
68
72
|
viewRef.current = nativeView.current;
|
|
69
73
|
}
|
|
70
|
-
|
|
74
|
+
if (!didNotifyPlayerViewReady.current) {
|
|
75
|
+
didNotifyPlayerViewReady.current = true;
|
|
76
|
+
onPlayerViewReady?.();
|
|
77
|
+
}
|
|
78
|
+
}, [isPlayerInitialized, viewRef, nativeView, onPlayerViewReady]);
|
|
71
79
|
useEffect(() => {
|
|
72
80
|
if (isPlayerInitialized && pictureInPictureActions != null) {
|
|
73
81
|
void nativeView.current?.updatePictureInPictureActions(pictureInPictureActions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PlayerView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAA0B,MAAM,UAAU,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AAGjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,SAAS,EAAE,SAAS;KACrB;CACF,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,iBAAiB,EACjB,oBAAo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AAC,CAAC,CAC/C,kBAAkB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CACjD,oBAAoB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CACrD,oBAAoB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CACrD,gBAAgB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAC7C,YAAY,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CACrC,gCAAgC,CAAC,CAAC,KAAK,CACrC,KAAK,CAAC,6BAA6B,CACpC,CAAC,CACF,gCAAgC,CAAC,CAAC,KAAK,CACrC,KAAK,CAAC,6BAA6B,CACpC,CAAC,CACF,qBAAqB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CACvD,4BAA4B,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,EACrE,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React, { RefObject, useEffect, useRef, useState } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { useKeepAwake } from 'expo-keep-awake';\nimport { NativePlayerView, NativePlayerViewConfig } from './native';\nimport { useProxy } from '../../hooks/useProxy';\nimport { FullscreenHandlerBridge } from '../../ui/fullscreenhandlerbridge';\nimport { CustomMessageHandlerBridge } from '../../ui/custommessagehandlerbridge';\nimport { PlayerViewProps } from './properties';\nimport { PictureInPictureAction } from './pictureInPictureAction';\nimport { addPlatformToMetadataEvent } from '../../utils/metadataPlatform';\n\n/**\n * Base style that initializes the native view frame when no width/height prop has been set.\n */\nconst styles = StyleSheet.create({\n baseStyle: {\n alignSelf: 'stretch',\n },\n});\n\n/**\n * Component that provides the Bitmovin Player UI and default UI handling to an attached `Player` instance.\n * This component needs a `Player` instance to work properly so make sure one is passed to it as a prop.\n *\n * @param options configuration options\n */\nexport function PlayerView({\n viewRef,\n style,\n player,\n config,\n fullscreenHandler,\n customMessageHandler,\n isFullscreenRequested = false,\n scalingMode,\n isPictureInPictureRequested = false,\n pictureInPictureActions,\n isPictureInPictureEnabled,\n ...props\n}: PlayerViewProps) {\n // Keep the device awake while the PlayerView is mounted\n useKeepAwake();\n\n const nativeView = useRef<InternalPlayerViewRef>(viewRef?.current || null);\n\n // Native events proxy helper.\n const proxy = useProxy();\n // Style resulting from merging `baseStyle` and `props.style`.\n const nativeViewStyle = StyleSheet.flatten([styles.baseStyle, style]);\n\n const fullscreenBridge: React.RefObject<FullscreenHandlerBridge | undefined> =\n useRef(undefined);\n if (fullscreenHandler && !fullscreenBridge.current) {\n fullscreenBridge.current = new FullscreenHandlerBridge();\n }\n if (fullscreenBridge.current) {\n fullscreenBridge.current.setFullscreenHandler(fullscreenHandler);\n }\n\n const customMessageHandlerBridge: React.RefObject<\n CustomMessageHandlerBridge | undefined\n > = useRef(undefined);\n if (customMessageHandler && !customMessageHandlerBridge.current) {\n customMessageHandlerBridge.current = new CustomMessageHandlerBridge();\n }\n if (customMessageHandlerBridge.current && customMessageHandler) {\n customMessageHandlerBridge.current.setCustomMessageHandler(\n customMessageHandler\n );\n }\n\n const nativePlayerViewConfig: NativePlayerViewConfig = {\n playerId: player.nativeId,\n customMessageHandlerBridgeId: customMessageHandlerBridge.current?.nativeId,\n enableBackgroundPlayback:\n player.config?.playbackConfig?.isBackgroundPlaybackEnabled,\n isPictureInPictureEnabledOnPlayer:\n player.config?.playbackConfig?.isPictureInPictureEnabled,\n userInterfaceTypeName: player.config?.styleConfig?.userInterfaceType,\n playerViewConfig: config,\n };\n\n const [isPlayerInitialized, setIsPlayerInitialized] = useState(false);\n\n useEffect(() => {\n void player.initialize().then(() => {\n setIsPlayerInitialized(true);\n // call attach player on native view if switched to AsyncFunction for RNPlayerViewExpo\n });\n\n return () => {\n fullscreenBridge.current?.destroy();\n fullscreenBridge.current = undefined;\n customMessageHandlerBridge.current?.destroy();\n customMessageHandlerBridge.current = undefined;\n };\n }, [player, fullscreenBridge, customMessageHandlerBridge]);\n\n useEffect(() => {\n if (isPlayerInitialized && viewRef) {\n viewRef.current = nativeView.current;\n }\n }, [isPlayerInitialized, viewRef, nativeView]);\n\n useEffect(() => {\n if (isPlayerInitialized && pictureInPictureActions != null) {\n void nativeView.current?.updatePictureInPictureActions(\n pictureInPictureActions\n );\n }\n }, [isPlayerInitialized, pictureInPictureActions]);\n\n useEffect(() => {\n if (isPlayerInitialized && isPictureInPictureEnabled != null) {\n void nativeView.current?.setIsPictureInPictureEnabled(\n isPictureInPictureEnabled\n );\n }\n }, [isPlayerInitialized, isPictureInPictureEnabled]);\n\n if (!isPlayerInitialized) {\n return null;\n }\n\n return (\n <NativePlayerView\n ref={nativeView}\n style={nativeViewStyle}\n config={nativePlayerViewConfig}\n isFullscreenRequested={isFullscreenRequested}\n isPictureInPictureRequested={isPictureInPictureRequested}\n scalingMode={scalingMode}\n fullscreenBridgeId={fullscreenBridge.current?.nativeId}\n onBmpAdBreakFinished={proxy(props.onAdBreakFinished)}\n onBmpAdBreakStarted={proxy(props.onAdBreakStarted)}\n onBmpAdClicked={proxy(props.onAdClicked)}\n onBmpAdError={proxy(props.onAdError)}\n onBmpAdFinished={proxy(props.onAdFinished)}\n onBmpAdManifestLoad={proxy(props.onAdManifestLoad)}\n onBmpAdManifestLoaded={proxy(props.onAdManifestLoaded)}\n onBmpAdQuartile={proxy(props.onAdQuartile)}\n onBmpAdScheduled={proxy(props.onAdScheduled)}\n onBmpAdSkipped={proxy(props.onAdSkipped)}\n onBmpAdStarted={proxy(props.onAdStarted)}\n onBmpCastAvailable={proxy(props.onCastAvailable)}\n onBmpCastPaused={proxy(props.onCastPaused)}\n onBmpCastPlaybackFinished={proxy(props.onCastPlaybackFinished)}\n onBmpCastPlaying={proxy(props.onCastPlaying)}\n onBmpCastStarted={proxy(props.onCastStarted)}\n onBmpCastStart={proxy(props.onCastStart)}\n onBmpCastStopped={proxy(props.onCastStopped)}\n onBmpCastTimeUpdated={proxy(props.onCastTimeUpdated)}\n onBmpCastWaitingForDevice={proxy(props.onCastWaitingForDevice)}\n onBmpCueEnter={proxy(props.onCueEnter)}\n onBmpCueExit={proxy(props.onCueExit)}\n onBmpMetadata={\n props.onMetadata\n ? (e) => props.onMetadata?.(addPlatformToMetadataEvent(e.nativeEvent))\n : undefined\n }\n onBmpMetadataParsed={\n props.onMetadataParsed\n ? (e) =>\n props.onMetadataParsed?.(\n addPlatformToMetadataEvent(e.nativeEvent)\n )\n : undefined\n }\n onBmpDestroy={proxy(props.onDestroy)}\n onBmpEvent={proxy(props.onEvent)}\n onBmpFullscreenEnabled={proxy(props.onFullscreenEnabled)}\n onBmpFullscreenDisabled={proxy(props.onFullscreenDisabled)}\n onBmpFullscreenEnter={proxy(props.onFullscreenEnter)}\n onBmpFullscreenExit={proxy(props.onFullscreenExit)}\n onBmpMuted={proxy(props.onMuted)}\n onBmpPaused={proxy(props.onPaused)}\n onBmpPictureInPictureAvailabilityChanged={proxy(\n props.onPictureInPictureAvailabilityChanged\n )}\n onBmpPictureInPictureEnter={proxy(props.onPictureInPictureEnter)}\n onBmpPictureInPictureEntered={proxy(props.onPictureInPictureEntered)}\n onBmpPictureInPictureExit={proxy(props.onPictureInPictureExit)}\n onBmpPictureInPictureExited={proxy(props.onPictureInPictureExited)}\n onBmpPlay={proxy(props.onPlay)}\n onBmpPlaybackFinished={proxy(props.onPlaybackFinished)}\n onBmpPlaybackSpeedChanged={proxy(props.onPlaybackSpeedChanged)}\n onBmpPlayerActive={proxy(props.onPlayerActive)}\n onBmpPlayerError={proxy(props.onPlayerError)}\n onBmpPlayerWarning={proxy(props.onPlayerWarning)}\n onBmpPlaying={proxy(props.onPlaying)}\n onBmpReady={proxy(props.onReady)}\n onBmpSeek={proxy(props.onSeek)}\n onBmpSeeked={proxy(props.onSeeked)}\n onBmpTimeShift={proxy(props.onTimeShift)}\n onBmpTimeShifted={proxy(props.onTimeShifted)}\n onBmpStallStarted={proxy(props.onStallStarted)}\n onBmpStallEnded={proxy(props.onStallEnded)}\n onBmpSourceError={proxy(props.onSourceError)}\n onBmpSourceLoad={proxy(props.onSourceLoad)}\n onBmpSourceLoaded={proxy(props.onSourceLoaded)}\n onBmpSourceUnloaded={proxy(props.onSourceUnloaded)}\n onBmpSourceWarning={proxy(props.onSourceWarning)}\n onBmpAudioAdded={proxy(props.onAudioAdded)}\n onBmpAudioChanged={proxy(props.onAudioChanged)}\n onBmpAudioRemoved={proxy(props.onAudioRemoved)}\n onBmpSubtitleAdded={proxy(props.onSubtitleAdded)}\n onBmpSubtitleChanged={proxy(props.onSubtitleChanged)}\n onBmpSubtitleRemoved={proxy(props.onSubtitleRemoved)}\n onBmpTimeChanged={proxy(props.onTimeChanged)}\n onBmpUnmuted={proxy(props.onUnmuted)}\n onBmpVideoDownloadQualityChanged={proxy(\n props.onVideoDownloadQualityChanged\n )}\n onBmpVideoPlaybackQualityChanged={proxy(\n props.onVideoPlaybackQualityChanged\n )}\n onBmpDownloadFinished={proxy(props.onDownloadFinished)}\n onBmpFairplayLicenseAcquired={proxy(props.onFairplayLicenseAcquired)}\n />\n );\n}\n\ninterface InternalPlayerViewRef extends RefObject<any> {\n /**\n * Update Picture in Picture actions that should be displayed on the Picture in Picture window.\n * Ideally we would just pass the props to the `NativePlayerView`, but due to a React Native limitation,\n * the props aren't passed to the native module when PiP is active on Android.\n */\n updatePictureInPictureActions: (\n actions: PictureInPictureAction[]\n ) => Promise<void>;\n /**\n * Enables or disables Picture in Picture mode availability.\n */\n setIsPictureInPictureEnabled: (isEnabled: boolean) => Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PlayerView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAA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KAAK,CACrC,KAAK,CAAC,6BAA6B,CACpC,CAAC,CACF,gCAAgC,CAAC,CAAC,KAAK,CACrC,KAAK,CAAC,6BAA6B,CACpC,CAAC,CACF,qBAAqB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CACvD,4BAA4B,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,EACrE,CACH,CAAC;AACJ,CAAC","sourcesContent":["import React, { RefObject, useEffect, useRef, useState } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { useKeepAwake } from 'expo-keep-awake';\nimport { NativePlayerView, NativePlayerViewConfig } from './native';\nimport { useProxy } from '../../hooks/useProxy';\nimport { FullscreenHandlerBridge } from '../../ui/fullscreenhandlerbridge';\nimport { CustomMessageHandlerBridge } from '../../ui/custommessagehandlerbridge';\nimport { PlayerViewProps } from './properties';\nimport { PictureInPictureAction } from './pictureInPictureAction';\nimport { addPlatformToMetadataEvent } from '../../utils/metadataPlatform';\n\n/**\n * Base style that initializes the native view frame when no width/height prop has been set.\n */\nconst styles = StyleSheet.create({\n baseStyle: {\n alignSelf: 'stretch',\n },\n});\n\n/**\n * Component that provides the Bitmovin Player UI and default UI handling to an attached `Player` instance.\n * This component needs a `Player` instance to work properly so make sure one is passed to it as a prop.\n *\n * @param options configuration options\n */\nexport function PlayerView({\n viewRef,\n style,\n player,\n config,\n fullscreenHandler,\n customMessageHandler,\n isFullscreenRequested = false,\n scalingMode,\n isPictureInPictureRequested = false,\n pictureInPictureActions,\n isPictureInPictureEnabled,\n onPlayerViewReady,\n ...props\n}: PlayerViewProps) {\n // Keep the device awake while the PlayerView is mounted\n useKeepAwake();\n\n const nativeView = useRef<InternalPlayerViewRef>(viewRef?.current || null);\n\n // Native events proxy helper.\n const proxy = useProxy();\n // Style resulting from merging `baseStyle` and `props.style`.\n const nativeViewStyle = StyleSheet.flatten([styles.baseStyle, style]);\n\n const fullscreenBridge: React.RefObject<FullscreenHandlerBridge | undefined> =\n useRef(undefined);\n if (fullscreenHandler && !fullscreenBridge.current) {\n fullscreenBridge.current = new FullscreenHandlerBridge();\n }\n if (fullscreenBridge.current) {\n fullscreenBridge.current.setFullscreenHandler(fullscreenHandler);\n }\n\n const customMessageHandlerBridge: React.RefObject<\n CustomMessageHandlerBridge | undefined\n > = useRef(undefined);\n if (customMessageHandler && !customMessageHandlerBridge.current) {\n customMessageHandlerBridge.current = new CustomMessageHandlerBridge();\n }\n if (customMessageHandlerBridge.current && customMessageHandler) {\n customMessageHandlerBridge.current.setCustomMessageHandler(\n customMessageHandler\n );\n }\n\n const nativePlayerViewConfig: NativePlayerViewConfig = {\n playerId: player.nativeId,\n customMessageHandlerBridgeId: customMessageHandlerBridge.current?.nativeId,\n enableBackgroundPlayback:\n player.config?.playbackConfig?.isBackgroundPlaybackEnabled,\n isPictureInPictureEnabledOnPlayer:\n player.config?.playbackConfig?.isPictureInPictureEnabled,\n userInterfaceTypeName: player.config?.styleConfig?.userInterfaceType,\n playerViewConfig: config,\n };\n\n const [isPlayerInitialized, setIsPlayerInitialized] = useState(false);\n const didNotifyPlayerViewReady = useRef(false);\n\n useEffect(() => {\n void player.initialize().then(() => {\n setIsPlayerInitialized(true);\n // call attach player on native view if switched to AsyncFunction for RNPlayerViewExpo\n });\n\n return () => {\n fullscreenBridge.current?.destroy();\n fullscreenBridge.current = undefined;\n customMessageHandlerBridge.current?.destroy();\n customMessageHandlerBridge.current = undefined;\n };\n }, [player, fullscreenBridge, customMessageHandlerBridge]);\n\n useEffect(() => {\n if (!isPlayerInitialized || !nativeView.current) {\n return;\n }\n\n if (viewRef) {\n viewRef.current = nativeView.current;\n }\n\n if (!didNotifyPlayerViewReady.current) {\n didNotifyPlayerViewReady.current = true;\n onPlayerViewReady?.();\n }\n }, [isPlayerInitialized, viewRef, nativeView, onPlayerViewReady]);\n\n useEffect(() => {\n if (isPlayerInitialized && pictureInPictureActions != null) {\n void nativeView.current?.updatePictureInPictureActions(\n pictureInPictureActions\n );\n }\n }, [isPlayerInitialized, pictureInPictureActions]);\n\n useEffect(() => {\n if (isPlayerInitialized && isPictureInPictureEnabled != null) {\n void nativeView.current?.setIsPictureInPictureEnabled(\n isPictureInPictureEnabled\n );\n }\n }, [isPlayerInitialized, isPictureInPictureEnabled]);\n\n if (!isPlayerInitialized) {\n return null;\n }\n\n return (\n <NativePlayerView\n ref={nativeView}\n style={nativeViewStyle}\n config={nativePlayerViewConfig}\n isFullscreenRequested={isFullscreenRequested}\n isPictureInPictureRequested={isPictureInPictureRequested}\n scalingMode={scalingMode}\n fullscreenBridgeId={fullscreenBridge.current?.nativeId}\n onBmpAdBreakFinished={proxy(props.onAdBreakFinished)}\n onBmpAdBreakStarted={proxy(props.onAdBreakStarted)}\n onBmpAdClicked={proxy(props.onAdClicked)}\n onBmpAdError={proxy(props.onAdError)}\n onBmpAdFinished={proxy(props.onAdFinished)}\n onBmpAdManifestLoad={proxy(props.onAdManifestLoad)}\n onBmpAdManifestLoaded={proxy(props.onAdManifestLoaded)}\n onBmpAdQuartile={proxy(props.onAdQuartile)}\n onBmpAdScheduled={proxy(props.onAdScheduled)}\n onBmpAdSkipped={proxy(props.onAdSkipped)}\n onBmpAdStarted={proxy(props.onAdStarted)}\n onBmpCastAvailable={proxy(props.onCastAvailable)}\n onBmpCastPaused={proxy(props.onCastPaused)}\n onBmpCastPlaybackFinished={proxy(props.onCastPlaybackFinished)}\n onBmpCastPlaying={proxy(props.onCastPlaying)}\n onBmpCastStarted={proxy(props.onCastStarted)}\n onBmpCastStart={proxy(props.onCastStart)}\n onBmpCastStopped={proxy(props.onCastStopped)}\n onBmpCastTimeUpdated={proxy(props.onCastTimeUpdated)}\n onBmpCastWaitingForDevice={proxy(props.onCastWaitingForDevice)}\n onBmpCueEnter={proxy(props.onCueEnter)}\n onBmpCueExit={proxy(props.onCueExit)}\n onBmpMetadata={\n props.onMetadata\n ? (e) => props.onMetadata?.(addPlatformToMetadataEvent(e.nativeEvent))\n : undefined\n }\n onBmpMetadataParsed={\n props.onMetadataParsed\n ? (e) =>\n props.onMetadataParsed?.(\n addPlatformToMetadataEvent(e.nativeEvent)\n )\n : undefined\n }\n onBmpDestroy={proxy(props.onDestroy)}\n onBmpEvent={proxy(props.onEvent)}\n onBmpFullscreenEnabled={proxy(props.onFullscreenEnabled)}\n onBmpFullscreenDisabled={proxy(props.onFullscreenDisabled)}\n onBmpFullscreenEnter={proxy(props.onFullscreenEnter)}\n onBmpFullscreenExit={proxy(props.onFullscreenExit)}\n onBmpMuted={proxy(props.onMuted)}\n onBmpPaused={proxy(props.onPaused)}\n onBmpPictureInPictureAvailabilityChanged={proxy(\n props.onPictureInPictureAvailabilityChanged\n )}\n onBmpPictureInPictureEnter={proxy(props.onPictureInPictureEnter)}\n onBmpPictureInPictureEntered={proxy(props.onPictureInPictureEntered)}\n onBmpPictureInPictureExit={proxy(props.onPictureInPictureExit)}\n onBmpPictureInPictureExited={proxy(props.onPictureInPictureExited)}\n onBmpPlay={proxy(props.onPlay)}\n onBmpPlaybackFinished={proxy(props.onPlaybackFinished)}\n onBmpPlaybackSpeedChanged={proxy(props.onPlaybackSpeedChanged)}\n onBmpPlayerActive={proxy(props.onPlayerActive)}\n onBmpPlayerError={proxy(props.onPlayerError)}\n onBmpPlayerWarning={proxy(props.onPlayerWarning)}\n onBmpPlaying={proxy(props.onPlaying)}\n onBmpReady={proxy(props.onReady)}\n onBmpSeek={proxy(props.onSeek)}\n onBmpSeeked={proxy(props.onSeeked)}\n onBmpTimeShift={proxy(props.onTimeShift)}\n onBmpTimeShifted={proxy(props.onTimeShifted)}\n onBmpStallStarted={proxy(props.onStallStarted)}\n onBmpStallEnded={proxy(props.onStallEnded)}\n onBmpSourceError={proxy(props.onSourceError)}\n onBmpSourceLoad={proxy(props.onSourceLoad)}\n onBmpSourceLoaded={proxy(props.onSourceLoaded)}\n onBmpSourceUnloaded={proxy(props.onSourceUnloaded)}\n onBmpSourceWarning={proxy(props.onSourceWarning)}\n onBmpAudioAdded={proxy(props.onAudioAdded)}\n onBmpAudioChanged={proxy(props.onAudioChanged)}\n onBmpAudioRemoved={proxy(props.onAudioRemoved)}\n onBmpSubtitleAdded={proxy(props.onSubtitleAdded)}\n onBmpSubtitleChanged={proxy(props.onSubtitleChanged)}\n onBmpSubtitleRemoved={proxy(props.onSubtitleRemoved)}\n onBmpTimeChanged={proxy(props.onTimeChanged)}\n onBmpUnmuted={proxy(props.onUnmuted)}\n onBmpVideoDownloadQualityChanged={proxy(\n props.onVideoDownloadQualityChanged\n )}\n onBmpVideoPlaybackQualityChanged={proxy(\n props.onVideoPlaybackQualityChanged\n )}\n onBmpDownloadFinished={proxy(props.onDownloadFinished)}\n onBmpFairplayLicenseAcquired={proxy(props.onFairplayLicenseAcquired)}\n />\n );\n}\n\ninterface InternalPlayerViewRef extends RefObject<any> {\n /**\n * Update Picture in Picture actions that should be displayed on the Picture in Picture window.\n * Ideally we would just pass the props to the `NativePlayerView`, but due to a React Native limitation,\n * the props aren't passed to the native module when PiP is active on Android.\n */\n updatePictureInPictureActions: (\n actions: PictureInPictureAction[]\n ) => Promise<void>;\n /**\n * Enables or disables Picture in Picture mode availability.\n */\n setIsPictureInPictureEnabled: (isEnabled: boolean) => Promise<void>;\n}\n"]}
|
|
@@ -72,6 +72,14 @@ export interface BasePlayerViewProps {
|
|
|
72
72
|
* Can be changed dynamically after the player is initialized.
|
|
73
73
|
*/
|
|
74
74
|
isPictureInPictureEnabled?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Event-style callback called once after the {@link PlayerView} has initialized its player and mounted the
|
|
77
|
+
* native view.
|
|
78
|
+
*
|
|
79
|
+
* Like other event callbacks, this is only invoked if provided when readiness happens; it is not replayed if
|
|
80
|
+
* assigned later.
|
|
81
|
+
*/
|
|
82
|
+
onPlayerViewReady?: () => void;
|
|
75
83
|
}
|
|
76
84
|
/**
|
|
77
85
|
* {@link PlayerView} component props.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/components/PlayerView/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IAEtC;;OAEG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;OAGG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;;;;;;;;;;;;;;OAeG;IACH,uBAAuB,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAEnD;;;;;OAKG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/components/PlayerView/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,MA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","sourceRoot":"","sources":["../../../src/components/PlayerView/properties.ts"],"names":[],"mappings":"","sourcesContent":["import { PlayerViewEvents } from './events';\nimport { Player } from '../../player';\nimport { FullscreenHandler, CustomMessageHandler } from '../../ui';\nimport { ScalingMode } from '../../styleConfig';\nimport { ViewStyle } from 'react-native';\nimport { PlayerViewConfig } from './playerViewConfig';\nimport { PictureInPictureAction } from './pictureInPictureAction';\nimport { RefObject } from 'react';\n\n/**\n * Base `PlayerView` component props.\n * Used to establish common props between `NativePlayerView` and {@link PlayerView}.\n */\nexport interface BasePlayerViewProps {\n ref?: RefObject<null>;\n /**\n * The {@link FullscreenHandler} that is used by the {@link PlayerView} to control the fullscreen mode.\n */\n fullscreenHandler?: FullscreenHandler;\n\n /**\n * The {@link CustomMessageHandler} that can be used to directly communicate with the embedded Bitmovin Web UI.\n */\n customMessageHandler?: CustomMessageHandler;\n\n /**\n * Can be set to `true` to request fullscreen mode, or `false` to request exit of fullscreen mode.\n * Should not be used to get the current fullscreen state. Use {@link PlayerViewEvents.onFullscreenEnter} and {@link PlayerViewEvents.onFullscreenExit}\n * or the {@link FullscreenHandler.isFullscreenActive} property to get the current state.\n * Using this property to change the fullscreen state, it is ensured that the embedded Player UI is also aware\n * of potential fullscreen state changes.\n * To use this property, a {@link FullscreenHandler} must be set.\n */\n isFullscreenRequested?: boolean;\n\n /**\n * A value defining how the video is displayed within the parent container's bounds.\n * Possible values are defined in {@link ScalingMode}.\n */\n scalingMode?: ScalingMode;\n\n /**\n * Can be set to `true` to request Picture in Picture mode, or `false` to request exit of Picture in Picture mode.\n * Should not be used to get the current Picture in Picture state. Use {@link PlayerViewEvents.onPictureInPictureEnter} and {@link PlayerViewEvents.onPictureInPictureExit}.\n */\n isPictureInPictureRequested?: boolean;\n\n /**\n * Style of the {@link PlayerView}.\n */\n style?: ViewStyle;\n\n /**\n * Configures the visual presentation and behaviour of the {@link PlayerView}.\n * The value must not be altered after setting it initially.\n */\n config?: PlayerViewConfig;\n\n /**\n * Picture in Picture actions that should be displayed on the Picture in Picture window.\n *\n * Limitations:\n * - On Android if an empty list is passed and {@link MediaControlConfig.isEnabled} is set to true\n * play, pause, next, and previous controls will appear, due to the default Android Picture in Picture implementation:\n * https://developer.android.com/develop/ui/views/picture-in-picture#add_controls\n * Set {@link MediaControlConfig.isEnabled} to false if this is\n * not the desired behaviour.\n * - on iOS/tvOS if {@link PictureInPictureAction.TogglePlayback} is not specified also other actions are\n * disabled due to OS limitations.\n *\n * Default value is `undefined`, which translates to:\n * - Android: No actions, unless {@link MediaControlConfig.isEnabled} is set to true\n * - iOS: All actions enabled\n */\n pictureInPictureActions?: PictureInPictureAction[];\n\n /**\n * Enables or disables Picture in Picture mode availability.\n * When disabled, `isPictureInPictureRequested` property has no effect.\n *\n * Can be changed dynamically after the player is initialized.\n */\n isPictureInPictureEnabled?: boolean;\n}\n\n/**\n * {@link PlayerView} component props.\n */\nexport interface PlayerViewProps extends BasePlayerViewProps, PlayerViewEvents {\n viewRef?: RefObject<any>;\n /**\n * {@link Player} instance (generally returned from {@link usePlayer} hook) that will control\n * and render audio/video inside the {@link PlayerView}.\n */\n player: Player;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/components/PlayerView/properties.ts"],"names":[],"mappings":"","sourcesContent":["import { PlayerViewEvents } from './events';\nimport { Player } from '../../player';\nimport { FullscreenHandler, CustomMessageHandler } from '../../ui';\nimport { ScalingMode } from '../../styleConfig';\nimport { ViewStyle } from 'react-native';\nimport { PlayerViewConfig } from './playerViewConfig';\nimport { PictureInPictureAction } from './pictureInPictureAction';\nimport { RefObject } from 'react';\n\n/**\n * Base `PlayerView` component props.\n * Used to establish common props between `NativePlayerView` and {@link PlayerView}.\n */\nexport interface BasePlayerViewProps {\n ref?: RefObject<null>;\n /**\n * The {@link FullscreenHandler} that is used by the {@link PlayerView} to control the fullscreen mode.\n */\n fullscreenHandler?: FullscreenHandler;\n\n /**\n * The {@link CustomMessageHandler} that can be used to directly communicate with the embedded Bitmovin Web UI.\n */\n customMessageHandler?: CustomMessageHandler;\n\n /**\n * Can be set to `true` to request fullscreen mode, or `false` to request exit of fullscreen mode.\n * Should not be used to get the current fullscreen state. Use {@link PlayerViewEvents.onFullscreenEnter} and {@link PlayerViewEvents.onFullscreenExit}\n * or the {@link FullscreenHandler.isFullscreenActive} property to get the current state.\n * Using this property to change the fullscreen state, it is ensured that the embedded Player UI is also aware\n * of potential fullscreen state changes.\n * To use this property, a {@link FullscreenHandler} must be set.\n */\n isFullscreenRequested?: boolean;\n\n /**\n * A value defining how the video is displayed within the parent container's bounds.\n * Possible values are defined in {@link ScalingMode}.\n */\n scalingMode?: ScalingMode;\n\n /**\n * Can be set to `true` to request Picture in Picture mode, or `false` to request exit of Picture in Picture mode.\n * Should not be used to get the current Picture in Picture state. Use {@link PlayerViewEvents.onPictureInPictureEnter} and {@link PlayerViewEvents.onPictureInPictureExit}.\n */\n isPictureInPictureRequested?: boolean;\n\n /**\n * Style of the {@link PlayerView}.\n */\n style?: ViewStyle;\n\n /**\n * Configures the visual presentation and behaviour of the {@link PlayerView}.\n * The value must not be altered after setting it initially.\n */\n config?: PlayerViewConfig;\n\n /**\n * Picture in Picture actions that should be displayed on the Picture in Picture window.\n *\n * Limitations:\n * - On Android if an empty list is passed and {@link MediaControlConfig.isEnabled} is set to true\n * play, pause, next, and previous controls will appear, due to the default Android Picture in Picture implementation:\n * https://developer.android.com/develop/ui/views/picture-in-picture#add_controls\n * Set {@link MediaControlConfig.isEnabled} to false if this is\n * not the desired behaviour.\n * - on iOS/tvOS if {@link PictureInPictureAction.TogglePlayback} is not specified also other actions are\n * disabled due to OS limitations.\n *\n * Default value is `undefined`, which translates to:\n * - Android: No actions, unless {@link MediaControlConfig.isEnabled} is set to true\n * - iOS: All actions enabled\n */\n pictureInPictureActions?: PictureInPictureAction[];\n\n /**\n * Enables or disables Picture in Picture mode availability.\n * When disabled, `isPictureInPictureRequested` property has no effect.\n *\n * Can be changed dynamically after the player is initialized.\n */\n isPictureInPictureEnabled?: boolean;\n\n /**\n * Event-style callback called once after the {@link PlayerView} has initialized its player and mounted the\n * native view.\n *\n * Like other event callbacks, this is only invoked if provided when readiness happens; it is not replayed if\n * assigned later.\n */\n onPlayerViewReady?: () => void;\n}\n\n/**\n * {@link PlayerView} component props.\n */\nexport interface PlayerViewProps extends BasePlayerViewProps, PlayerViewEvents {\n viewRef?: RefObject<any>;\n /**\n * {@link Player} instance (generally returned from {@link usePlayer} hook) that will control\n * and render audio/video inside the {@link PlayerView}.\n */\n player: Player;\n}\n"]}
|
|
@@ -28,7 +28,7 @@ Pod::Spec.new do |s|
|
|
|
28
28
|
s.static_framework = true
|
|
29
29
|
|
|
30
30
|
s.dependency 'ExpoModulesCore'
|
|
31
|
-
s.dependency "BitmovinPlayer", "3.
|
|
31
|
+
s.dependency "BitmovinPlayer", "3.117.0"
|
|
32
32
|
s.ios.dependency "GoogleAds-IMA-iOS-SDK", "3.26.1"
|
|
33
33
|
s.tvos.dependency "GoogleAds-IMA-tvOS-SDK", "4.15.1"
|
|
34
34
|
|
package/package.json
CHANGED
|
@@ -36,6 +36,7 @@ export function PlayerView({
|
|
|
36
36
|
isPictureInPictureRequested = false,
|
|
37
37
|
pictureInPictureActions,
|
|
38
38
|
isPictureInPictureEnabled,
|
|
39
|
+
onPlayerViewReady,
|
|
39
40
|
...props
|
|
40
41
|
}: PlayerViewProps) {
|
|
41
42
|
// Keep the device awake while the PlayerView is mounted
|
|
@@ -81,6 +82,7 @@ export function PlayerView({
|
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
const [isPlayerInitialized, setIsPlayerInitialized] = useState(false);
|
|
85
|
+
const didNotifyPlayerViewReady = useRef(false);
|
|
84
86
|
|
|
85
87
|
useEffect(() => {
|
|
86
88
|
void player.initialize().then(() => {
|
|
@@ -97,10 +99,19 @@ export function PlayerView({
|
|
|
97
99
|
}, [player, fullscreenBridge, customMessageHandlerBridge]);
|
|
98
100
|
|
|
99
101
|
useEffect(() => {
|
|
100
|
-
if (isPlayerInitialized
|
|
102
|
+
if (!isPlayerInitialized || !nativeView.current) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (viewRef) {
|
|
101
107
|
viewRef.current = nativeView.current;
|
|
102
108
|
}
|
|
103
|
-
|
|
109
|
+
|
|
110
|
+
if (!didNotifyPlayerViewReady.current) {
|
|
111
|
+
didNotifyPlayerViewReady.current = true;
|
|
112
|
+
onPlayerViewReady?.();
|
|
113
|
+
}
|
|
114
|
+
}, [isPlayerInitialized, viewRef, nativeView, onPlayerViewReady]);
|
|
104
115
|
|
|
105
116
|
useEffect(() => {
|
|
106
117
|
if (isPlayerInitialized && pictureInPictureActions != null) {
|
|
@@ -81,6 +81,15 @@ export interface BasePlayerViewProps {
|
|
|
81
81
|
* Can be changed dynamically after the player is initialized.
|
|
82
82
|
*/
|
|
83
83
|
isPictureInPictureEnabled?: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Event-style callback called once after the {@link PlayerView} has initialized its player and mounted the
|
|
87
|
+
* native view.
|
|
88
|
+
*
|
|
89
|
+
* Like other event callbacks, this is only invoked if provided when readiness happens; it is not replayed if
|
|
90
|
+
* assigned later.
|
|
91
|
+
*/
|
|
92
|
+
onPlayerViewReady?: () => void;
|
|
84
93
|
}
|
|
85
94
|
|
|
86
95
|
/**
|