bitmovin-player-react-native 0.4.0 → 0.5.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.
Files changed (43) hide show
  1. package/README.md +249 -1
  2. package/RNBitmovinPlayer.podspec +3 -1
  3. package/android/build.gradle +3 -2
  4. package/android/src/main/java/com/bitmovin/player/reactnative/AnalyticsModule.kt +154 -0
  5. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerView.kt +45 -0
  6. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewManager.kt +25 -4
  7. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewPackage.kt +3 -0
  8. package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +172 -0
  9. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/Any.kt +27 -0
  10. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/ReactContextExtension.kt +8 -0
  11. package/android/src/main/java/com/bitmovin/player/reactnative/extensions/String.kt +8 -0
  12. package/android/src/main/java/com/bitmovin/player/reactnative/ui/FullscreenHandlerBridge.kt +37 -0
  13. package/android/src/main/java/com/bitmovin/player/reactnative/ui/FullscreenHandlerModule.kt +73 -0
  14. package/ios/AnalyticsModule.m +14 -0
  15. package/ios/AnalyticsModule.swift +180 -0
  16. package/ios/Event+JSON.swift +11 -0
  17. package/ios/FullscreenHandlerBridge.swift +33 -0
  18. package/ios/FullscreenHandlerModule.m +9 -0
  19. package/ios/FullscreenHandlerModule.swift +71 -0
  20. package/ios/RCTConvert+BitmovinPlayer.swift +174 -0
  21. package/ios/RNPlayerView+PlayerListener.swift +5 -1
  22. package/ios/RNPlayerView+UserInterfaceListener.swift +16 -0
  23. package/ios/RNPlayerView.swift +5 -0
  24. package/ios/RNPlayerViewManager.m +6 -0
  25. package/ios/RNPlayerViewManager.swift +21 -0
  26. package/lib/index.d.ts +498 -51
  27. package/lib/index.js +186 -42
  28. package/lib/index.mjs +167 -26
  29. package/package.json +1 -1
  30. package/src/analytics/collector.ts +97 -0
  31. package/src/analytics/config.ts +218 -0
  32. package/src/analytics/index.ts +2 -0
  33. package/src/components/PlayerView/events.ts +10 -0
  34. package/src/components/PlayerView/index.tsx +38 -1
  35. package/src/components/PlayerView/native.ts +4 -1
  36. package/src/events.ts +43 -0
  37. package/src/index.ts +2 -0
  38. package/src/media.ts +33 -0
  39. package/src/player.ts +21 -0
  40. package/src/source.ts +4 -0
  41. package/src/styleConfig.ts +87 -0
  42. package/src/ui/fullscreenhandler.ts +19 -0
  43. package/src/ui/fullscreenhandlerbridge.ts +59 -0
package/lib/index.d.ts CHANGED
@@ -148,6 +148,300 @@ interface AdBreak {
148
148
  scheduleTime: number;
149
149
  }
150
150
 
151
+ interface NativeInstanceConfig {
152
+ /**
153
+ * Optionally user-defined string `id` for the native instance.
154
+ * Used to access a certain native instance from any point in the source code then call
155
+ * methods/properties on it.
156
+ *
157
+ * When left empty, a random `UUIDv4` is generated for it.
158
+ * @example
159
+ * Accessing or creating the `Player` with `nativeId` equal to `my-player`:
160
+ * ```
161
+ * const player = new Player({ nativeId: 'my-player' })
162
+ * player.play(); // call methods and properties...
163
+ * ```
164
+ */
165
+ nativeId?: string;
166
+ }
167
+ declare abstract class NativeInstance<Config extends NativeInstanceConfig> {
168
+ /**
169
+ * Optionally user-defined string `id` for the native instance, or UUIDv4.
170
+ */
171
+ readonly nativeId: string;
172
+ /**
173
+ * The configuration object used to initialize this instance.
174
+ */
175
+ readonly config?: Config;
176
+ /**
177
+ * Generate UUID in case the user-defined `nativeId` is empty.
178
+ */
179
+ constructor(config?: Config);
180
+ /**
181
+ * Flag indicating whether the native resources of this object have been created internally
182
+ * .i.e `initialize` has been called.
183
+ */
184
+ abstract isInitialized: boolean;
185
+ /**
186
+ * Create the native object/resources that will be managed by this instance.
187
+ */
188
+ abstract initialize(): void;
189
+ /**
190
+ * Flag indicating whether the native resources of this object have been disposed .i.e
191
+ * `destroy` has been called.
192
+ */
193
+ abstract isDestroyed: boolean;
194
+ /**
195
+ * Dispose the native object/resources created by this instance during `initialize`.
196
+ */
197
+ abstract destroy(): void;
198
+ }
199
+
200
+ /**
201
+ * Available cdn provider options for AnalyticsConfig.
202
+ */
203
+ declare enum CdnProvider {
204
+ BITMOVIN = "bitmovin",
205
+ AKAMAI = "akamai",
206
+ FASTLY = "fastly",
207
+ MAXCDN = "maxcdn",
208
+ CLOUDFRONT = "cloudfront",
209
+ CHINACACHE = "chinacache",
210
+ BITGRAVITY = "bitgravity"
211
+ }
212
+ /**
213
+ * Object used to configure a new `AnalyticsCollector` instance.
214
+ */
215
+ interface AnalyticsConfig extends NativeInstanceConfig, CustomDataConfig {
216
+ /**
217
+ * CDN Provide that the video playback session is using.
218
+ */
219
+ cdnProvider?: CdnProvider;
220
+ /**
221
+ * User ID of the customer.
222
+ */
223
+ customUserId?: string;
224
+ /**
225
+ * Experiment name needed for A/B testing.
226
+ */
227
+ experimentName?: string;
228
+ /**
229
+ * ID of the video in the CMS system.
230
+ */
231
+ videoId?: string;
232
+ /**
233
+ * Human readable title of the video asset currently playing.
234
+ */
235
+ title?: string;
236
+ /**
237
+ * Analytics key.
238
+ */
239
+ key: string;
240
+ /**
241
+ * Player key.
242
+ */
243
+ playerKey?: string;
244
+ /**
245
+ * Breadcrumb path to show where in the app the user is.
246
+ */
247
+ path?: string;
248
+ /**
249
+ * Flag to see if stream is live before stream metadata is available (default: false).
250
+ */
251
+ isLive?: boolean;
252
+ /**
253
+ * Flag to enable Ad tracking (default: false).
254
+ */
255
+ ads?: boolean;
256
+ /**
257
+ * Flag to use randomised userId not depending on device specific values (default: false).
258
+ */
259
+ randomizeUserId?: boolean;
260
+ }
261
+ interface CustomDataConfig {
262
+ /**
263
+ * Optional free-form custom data
264
+ */
265
+ customData1?: string;
266
+ /**
267
+ * Optional free-form custom data
268
+ */
269
+ customData2?: string;
270
+ /**
271
+ * Optional free-form custom data
272
+ */
273
+ customData3?: string;
274
+ /**
275
+ * Optional free-form custom data
276
+ */
277
+ customData4?: string;
278
+ /**
279
+ * Optional free-form custom data
280
+ */
281
+ customData5?: string;
282
+ /**
283
+ * Optional free-form custom data
284
+ */
285
+ customData6?: string;
286
+ /**
287
+ * Optional free-form custom data
288
+ */
289
+ customData7?: string;
290
+ /**
291
+ * Optional free-form custom data
292
+ */
293
+ customData8?: string;
294
+ /**
295
+ * Optional free-form custom data
296
+ */
297
+ customData9?: string;
298
+ /**
299
+ * Optional free-form custom data
300
+ */
301
+ customData10?: string;
302
+ /**
303
+ * Optional free-form custom data
304
+ */
305
+ customData11?: string;
306
+ /**
307
+ * Optional free-form custom data
308
+ */
309
+ customData12?: string;
310
+ /**
311
+ * Optional free-form custom data
312
+ */
313
+ customData13?: string;
314
+ /**
315
+ * Optional free-form custom data
316
+ */
317
+ customData14?: string;
318
+ /**
319
+ * Optional free-form custom data
320
+ */
321
+ customData15?: string;
322
+ /**
323
+ * Optional free-form custom data
324
+ */
325
+ customData16?: string;
326
+ /**
327
+ * Optional free-form custom data
328
+ */
329
+ customData17?: string;
330
+ /**
331
+ * Optional free-form custom data
332
+ */
333
+ customData18?: string;
334
+ /**
335
+ * Optional free-form custom data
336
+ */
337
+ customData19?: string;
338
+ /**
339
+ * Optional free-form custom data
340
+ */
341
+ customData20?: string;
342
+ /**
343
+ * Optional free-form custom data
344
+ */
345
+ customData21?: string;
346
+ /**
347
+ * Optional free-form custom data
348
+ */
349
+ customData22?: string;
350
+ /**
351
+ * Optional free-form custom data
352
+ */
353
+ customData23?: string;
354
+ /**
355
+ * Optional free-form custom data
356
+ */
357
+ customData24?: string;
358
+ /**
359
+ * Optional free-form custom data
360
+ */
361
+ customData25?: string;
362
+ /**
363
+ * Optional free-form custom data
364
+ */
365
+ customData26?: string;
366
+ /**
367
+ * Optional free-form custom data
368
+ */
369
+ customData27?: string;
370
+ /**
371
+ * Optional free-form custom data
372
+ */
373
+ customData28?: string;
374
+ /**
375
+ * Optional free-form custom data
376
+ */
377
+ customData29?: string;
378
+ /**
379
+ * Optional free-form custom data
380
+ */
381
+ customData30?: string;
382
+ }
383
+
384
+ /**
385
+ * Analytics collector that can be attached to a player object in order to collect and send
386
+ * its analytics information.
387
+ */
388
+ declare class AnalyticsCollector extends NativeInstance<AnalyticsConfig> {
389
+ /**
390
+ * Whether the native `AnalyticsCollector` object has been created.
391
+ */
392
+ isInitialized: boolean;
393
+ /**
394
+ * Whether the native `AnalyticsCollector` object has been disposed.
395
+ */
396
+ isDestroyed: boolean;
397
+ /**
398
+ * Initializes a native `BitmovinPlayerCollector` object.
399
+ */
400
+ initialize: () => void;
401
+ /**
402
+ * Disposes the native `BitmovinPlayerCollector` object that has been created
403
+ * during initialization.
404
+ */
405
+ destroy: () => void;
406
+ /**
407
+ * Attach a player instance to this analytics plugin. After this is completed, BitmovinAnalytics
408
+ * will start monitoring and sending analytics data based on the attached player instance.
409
+ *
410
+ * @param playerId - Native Id of the player to attach this collector instance.
411
+ */
412
+ attach: (playerId: string) => void;
413
+ /**
414
+ * Detach a player instance from this analytics plugin if there's any attached. If no player is attached,
415
+ * nothing happens.
416
+ */
417
+ detach: () => void;
418
+ /**
419
+ * Dynamically updates analytics custom data information. Use this method
420
+ * to update your custom data during runtime.
421
+ *
422
+ * @param customData - Analytics custom data config.
423
+ */
424
+ setCustomDataOnce: (customData: CustomDataConfig) => void;
425
+ /**
426
+ * Sets the internal analytics custom data state.
427
+ *
428
+ * @param customData - Analytics custom data config.
429
+ */
430
+ setCustomData: (customData: CustomDataConfig) => void;
431
+ /**
432
+ * Gets the current custom data config from the native `BitmovinPlayerCollector` instance.
433
+ *
434
+ * @returns The current custom data config.
435
+ */
436
+ getCustomData: () => Promise<CustomDataConfig>;
437
+ /**
438
+ * Gets the current user id used by the native `BitmovinPlayerCollector` instance.
439
+ *
440
+ * @returns The current user id.
441
+ */
442
+ getUserId: () => Promise<string>;
443
+ }
444
+
151
445
  /**
152
446
  * An audio session category defines a set of audio behaviors.
153
447
  * Choose a category that most accurately describes the audio behavior you require.
@@ -250,6 +544,40 @@ interface SubtitleTrack {
250
544
  */
251
545
  declare type SideLoadedSubtitleTrack = MakeRequired<SubtitleTrack, 'url' | 'label' | 'language' | 'format'>;
252
546
 
547
+ /**
548
+ * Quality definition of a video representation.
549
+ */
550
+ interface VideoQuality {
551
+ /**
552
+ * The id of the media quality.
553
+ */
554
+ id: string;
555
+ /**
556
+ * The label of the media quality that should be exposed to the user.
557
+ */
558
+ label?: string;
559
+ /**
560
+ * The bitrate of the media quality.
561
+ */
562
+ bitrate?: number;
563
+ /**
564
+ * The codec of the media quality.
565
+ */
566
+ codec?: string;
567
+ /**
568
+ * The frame rate of the video quality. If the frame rate is not known or not applicable a value of -1 will be returned.
569
+ */
570
+ frameRate?: number;
571
+ /**
572
+ * The height of the video quality.
573
+ */
574
+ height?: number;
575
+ /**
576
+ * The width of the video quality.
577
+ */
578
+ width?: number;
579
+ }
580
+
253
581
  /**
254
582
  * Base event type for all events.
255
583
  */
@@ -518,6 +846,34 @@ interface PictureInPictureEnteredEvent extends Event {
518
846
  */
519
847
  interface PictureInPictureExitedEvent extends Event {
520
848
  }
849
+ /**
850
+ * Emitted when the fullscreen functionality has been enabled.
851
+ *
852
+ * @platform iOS, Android
853
+ */
854
+ interface FullscreenEnabledEvent extends Event {
855
+ }
856
+ /**
857
+ * Emitted when the fullscreen functionality has been disabled.
858
+ *
859
+ * @platform iOS, Android
860
+ */
861
+ interface FullscreenDisabledEvent extends Event {
862
+ }
863
+ /**
864
+ * Emitted when the player enters fullscreen mode.
865
+ *
866
+ * @platform iOS, Android
867
+ */
868
+ interface FullscreenEnterEvent extends Event {
869
+ }
870
+ /**
871
+ * Emitted when the player exits fullscreen mode.
872
+ *
873
+ * @platform iOS, Android
874
+ */
875
+ interface FullscreenExitEvent extends Event {
876
+ }
521
877
  /**
522
878
  * Emitted when the availability of the Picture in Picture mode changed on Android.
523
879
  *
@@ -672,6 +1028,19 @@ interface AdManifestLoadedEvent extends Event {
672
1028
  */
673
1029
  downloadTime: number;
674
1030
  }
1031
+ /**
1032
+ * Emitted when the current video playback quality has changed.
1033
+ */
1034
+ interface VideoPlaybackQualityChangedEvent extends Event {
1035
+ /**
1036
+ * The new quality
1037
+ */
1038
+ newVideoQuality: VideoQuality;
1039
+ /**
1040
+ * The previous quality
1041
+ */
1042
+ oldVideoQuality: VideoQuality;
1043
+ }
675
1044
 
676
1045
  /**
677
1046
  * Type that defines all event props supported by `PlayerView` and `NativePlayerView`.
@@ -691,6 +1060,10 @@ interface EventProps {
691
1060
  onAdStarted: AdStartedEvent;
692
1061
  onDestroy: DestroyEvent;
693
1062
  onEvent: Event;
1063
+ onFullscreenEnabled: FullscreenEnabledEvent;
1064
+ onFullscreenDisabled: FullscreenDisabledEvent;
1065
+ onFullscreenEnter: FullscreenEnterEvent;
1066
+ onFullscreenExit: FullscreenExitEvent;
694
1067
  onMuted: MutedEvent;
695
1068
  onPaused: PausedEvent;
696
1069
  onPictureInPictureAvailabilityChanged: PictureInPictureAvailabilityChangedEvent;
@@ -719,6 +1092,7 @@ interface EventProps {
719
1092
  onSubtitleRemoved: SubtitleRemovedEvent;
720
1093
  onTimeChanged: TimeChangedEvent;
721
1094
  onUnmuted: UnmutedEvent;
1095
+ onVideoPlaybackQualityChanged: VideoPlaybackQualityChangedEvent;
722
1096
  }
723
1097
  /**
724
1098
  * Event props for `PlayerView`.
@@ -730,55 +1104,6 @@ declare type PlayerViewEvents = {
730
1104
  [Prop in keyof EventProps]?: (event: EventProps[Prop]) => void;
731
1105
  };
732
1106
 
733
- interface NativeInstanceConfig {
734
- /**
735
- * Optionally user-defined string `id` for the native instance.
736
- * Used to access a certain native instance from any point in the source code then call
737
- * methods/properties on it.
738
- *
739
- * When left empty, a random `UUIDv4` is generated for it.
740
- * @example
741
- * Accessing or creating the `Player` with `nativeId` equal to `my-player`:
742
- * ```
743
- * const player = new Player({ nativeId: 'my-player' })
744
- * player.play(); // call methods and properties...
745
- * ```
746
- */
747
- nativeId?: string;
748
- }
749
- declare abstract class NativeInstance<Config extends NativeInstanceConfig> {
750
- /**
751
- * Optionally user-defined string `id` for the native instance, or UUIDv4.
752
- */
753
- readonly nativeId: string;
754
- /**
755
- * The configuration object used to initialize this instance.
756
- */
757
- readonly config?: Config;
758
- /**
759
- * Generate UUID in case the user-defined `nativeId` is empty.
760
- */
761
- constructor(config?: Config);
762
- /**
763
- * Flag indicating whether the native resources of this object have been created internally
764
- * .i.e `initialize` has been called.
765
- */
766
- abstract isInitialized: boolean;
767
- /**
768
- * Create the native object/resources that will be managed by this instance.
769
- */
770
- abstract initialize(): void;
771
- /**
772
- * Flag indicating whether the native resources of this object have been disposed .i.e
773
- * `destroy` has been called.
774
- */
775
- abstract isDestroyed: boolean;
776
- /**
777
- * Dispose the native object/resources created by this instance during `initialize`.
778
- */
779
- abstract destroy(): void;
780
- }
781
-
782
1107
  /**
783
1108
  * Represents a FairPlay Streaming DRM config.
784
1109
  */
@@ -1077,6 +1402,10 @@ interface SourceConfig extends NativeInstanceConfig {
1077
1402
  * External subtitle tracks to be added into the player.
1078
1403
  */
1079
1404
  subtitleTracks?: SideLoadedSubtitleTrack[];
1405
+ /**
1406
+ * External thumbnails to be added into the player.
1407
+ */
1408
+ thumbnailTrack?: string;
1080
1409
  }
1081
1410
  /**
1082
1411
  * Represents audio and video content that can be loaded into a player.
@@ -1131,6 +1460,93 @@ declare class Source extends NativeInstance<SourceConfig> {
1131
1460
  loadingState: () => Promise<LoadingState>;
1132
1461
  }
1133
1462
 
1463
+ /**
1464
+ * Contains config values which can be used to alter the visual presentation and behaviour of the player UI.
1465
+ */
1466
+ interface StyleConfig {
1467
+ /**
1468
+ * Sets if the UI should be enabled or not. Default value is true.
1469
+ * @example
1470
+ * ```
1471
+ * const player = new Player({
1472
+ * styleConfig: {
1473
+ * isUiEnabled: false,
1474
+ * },
1475
+ * });
1476
+ * ```
1477
+ */
1478
+ isUiEnabled?: boolean;
1479
+ /**
1480
+ * Set the CSS file that will be used for the UI. The default CSS file will be completely replaced by the CSS file set with this property.
1481
+ * @example
1482
+ * ```
1483
+ * const player = new Player({
1484
+ * styleConfig: {
1485
+ * playerUiCss: 'https://domain.tld/path/to/bitmovinplayer-ui.css',
1486
+ * },
1487
+ * });
1488
+ * ```
1489
+ * @platform iOS, Android
1490
+ */
1491
+ playerUiCss?: string;
1492
+ /**
1493
+ * Set a CSS file which contains supplemental styles for the player UI. These styles will be added to the default CSS file or the CSS file set with StyleConfig#playerUiCss.
1494
+ * @example
1495
+ * ```
1496
+ * const player = new Player({
1497
+ * styleConfig: {
1498
+ * supplementalPlayerUiCss: 'https://domain.tld/path/to/bitmovinplayer-supplemental-ui.css',
1499
+ * },
1500
+ * });
1501
+ * ```
1502
+ * @platform iOS, Android
1503
+ */
1504
+ supplementalPlayerUiCss?: string;
1505
+ /**
1506
+ * Sets the JS file that will be used for the UI. The default JS file will be completely replaced by the JS file set with this property.
1507
+ * @example
1508
+ * ```
1509
+ * const player = new Player({
1510
+ * styleConfig: {
1511
+ * playerUiJs: 'https://domain.tld/path/to/bitmovinplayer-ui.js',
1512
+ * },
1513
+ * });
1514
+ * ```
1515
+ * @platform iOS, Android
1516
+ */
1517
+ playerUiJs?: string;
1518
+ /**
1519
+ * Determines how the video content is scaled or stretched within the parent container’s bounds. Possible values are defined in ScalingMode.
1520
+ * Default value is ScalingMode.fit.
1521
+ * @example
1522
+ * ```
1523
+ * const player = new Player({
1524
+ * styleConfig: {
1525
+ * scalingMode: ScalingMode.Zoom,
1526
+ * },
1527
+ * });
1528
+ * ```
1529
+ */
1530
+ scalingMode?: ScalingMode;
1531
+ }
1532
+ /**
1533
+ * Specifies how the video content is scaled or stretched.
1534
+ */
1535
+ declare enum ScalingMode {
1536
+ /**
1537
+ * Specifies that the player should preserve the video’s aspect ratio and fit the video within the container's bounds.
1538
+ */
1539
+ Fit = "Fit",
1540
+ /**
1541
+ * Specifies that the video should be stretched to fill the container’s bounds. The aspect ratio may not be preserved.
1542
+ */
1543
+ Stretch = "Stretch",
1544
+ /**
1545
+ * Specifies that the player should preserve the video’s aspect ratio and fill the container’s bounds.
1546
+ */
1547
+ Zoom = "Zoom"
1548
+ }
1549
+
1134
1550
  /**
1135
1551
  * This configuration is used as an incubator for experimental features. Tweaks are not officially
1136
1552
  * supported and are not guaranteed to be stable, i.e. their naming, functionality and API can
@@ -1312,6 +1728,10 @@ interface PlayerConfig extends NativeInstanceConfig {
1312
1728
  * Configures playback behaviour. A default PlaybackConfig is set initially.
1313
1729
  */
1314
1730
  playbackConfig?: PlaybackConfig;
1731
+ /**
1732
+ * Configures the visual presentation and behaviour of the player UI. A default StyleConfig is set initially.
1733
+ */
1734
+ styleConfig?: StyleConfig;
1315
1735
  /**
1316
1736
  * Configures advertising functionality. A default AdvertisingConfig is set initially.
1317
1737
  */
@@ -1320,6 +1740,10 @@ interface PlayerConfig extends NativeInstanceConfig {
1320
1740
  * Configures experimental features. A default TweaksConfig is set initially.
1321
1741
  */
1322
1742
  tweaksConfig?: TweaksConfig;
1743
+ /**
1744
+ * Configures analytics functionality.
1745
+ */
1746
+ analyticsConfig?: AnalyticsConfig;
1323
1747
  }
1324
1748
  /**
1325
1749
  * Configures the playback behaviour of the player.
@@ -1411,6 +1835,10 @@ declare class Player extends NativeInstance<PlayerConfig> {
1411
1835
  * Currently active source, or `null` if none is active.
1412
1836
  */
1413
1837
  source?: Source;
1838
+ /**
1839
+ * Analytics collector currently attached to this player instance.
1840
+ */
1841
+ analyticsCollector?: AnalyticsCollector;
1414
1842
  /**
1415
1843
  * Whether the native `Player` object has been created.
1416
1844
  */
@@ -1541,6 +1969,24 @@ declare class Player extends NativeInstance<PlayerConfig> {
1541
1969
  isAd: () => Promise<boolean>;
1542
1970
  }
1543
1971
 
1972
+ /**
1973
+ * Handles the UI state change when fullscreen should be entered or exited.
1974
+ */
1975
+ interface FullscreenHandler {
1976
+ /**
1977
+ * Indicates if the UI is currently in fullscreen mode
1978
+ */
1979
+ isFullscreenActive: boolean;
1980
+ /**
1981
+ * Is called by the `PlayerView` when the UI should enter fullscreen mode.
1982
+ */
1983
+ enterFullscreen(): void;
1984
+ /**
1985
+ * Is called by the `PlayerView` when the UI should exit fullscreen mode.
1986
+ */
1987
+ exitFullscreen(): void;
1988
+ }
1989
+
1544
1990
  /**
1545
1991
  * Base `PlayerView` component props. Used to stablish common
1546
1992
  * props between `NativePlayerView` and `PlayerView`.
@@ -1559,12 +2005,13 @@ interface PlayerViewProps extends BasePlayerViewProps, PlayerViewEvents {
1559
2005
  * and render audio/video inside the `PlayerView`.
1560
2006
  */
1561
2007
  player: Player;
2008
+ fullscreenHandler?: FullscreenHandler;
1562
2009
  }
1563
2010
  /**
1564
2011
  * Component that provides the Bitmovin Player UI and default UI handling to an attached `Player` instance.
1565
2012
  * This component needs a `Player` instance to work properly so make sure one is passed to it as a prop.
1566
2013
  */
1567
- declare function PlayerView({ style, player, ...props }: PlayerViewProps): JSX.Element;
2014
+ declare function PlayerView({ style, player, fullscreenHandler, ...props }: PlayerViewProps): JSX.Element;
1568
2015
 
1569
2016
  /**
1570
2017
  * React hook that creates and returns a reference to a `Player` instance
@@ -1572,4 +2019,4 @@ declare function PlayerView({ style, player, ...props }: PlayerViewProps): JSX.E
1572
2019
  */
1573
2020
  declare function usePlayer(config?: PlayerConfig): Player;
1574
2021
 
1575
- export { Ad, AdBreak, AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdConfig, AdData, AdErrorEvent, AdFinishedEvent, AdItem, AdManifestLoadEvent, AdManifestLoadedEvent, AdQuartile, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdSource, AdSourceType, AdStartedEvent, AdvertisingConfig, AudioSession, AudioSessionCategory, BasePlayerViewProps, DestroyEvent, Drm, DrmConfig, ErrorEvent, Event, EventSource, FairplayConfig, LoadingState, MutedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlayEvent, PlaybackConfig, PlaybackFinishedEvent, Player, PlayerActiveEvent, PlayerConfig, PlayerErrorEvent, PlayerView, PlayerViewProps, PlayerWarningEvent, PlayingEvent, ReadyEvent, SeekEvent, SeekedEvent, SideLoadedSubtitleTrack, Source, SourceConfig, SourceErrorEvent, SourceLoadEvent, SourceLoadedEvent, SourceType, SourceUnloadedEvent, SourceWarningEvent, StallEndedEvent, StallStartedEvent, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleFormat, SubtitleRemovedEvent, SubtitleTrack, TimeChangedEvent, UnmutedEvent, WidevineConfig, usePlayer };
2022
+ export { Ad, AdBreak, AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdConfig, AdData, AdErrorEvent, AdFinishedEvent, AdItem, AdManifestLoadEvent, AdManifestLoadedEvent, AdQuartile, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdSource, AdSourceType, AdStartedEvent, AdvertisingConfig, AnalyticsCollector, AnalyticsConfig, AudioSession, AudioSessionCategory, BasePlayerViewProps, CdnProvider, CustomDataConfig, DestroyEvent, Drm, DrmConfig, ErrorEvent, Event, EventSource, FairplayConfig, FullscreenDisabledEvent, FullscreenEnabledEvent, FullscreenEnterEvent, FullscreenExitEvent, LoadingState, MutedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlayEvent, PlaybackConfig, PlaybackFinishedEvent, Player, PlayerActiveEvent, PlayerConfig, PlayerErrorEvent, PlayerView, PlayerViewProps, PlayerWarningEvent, PlayingEvent, ReadyEvent, ScalingMode, SeekEvent, SeekedEvent, SideLoadedSubtitleTrack, Source, SourceConfig, SourceErrorEvent, SourceLoadEvent, SourceLoadedEvent, SourceType, SourceUnloadedEvent, SourceWarningEvent, StallEndedEvent, StallStartedEvent, StyleConfig, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleFormat, SubtitleRemovedEvent, SubtitleTrack, TimeChangedEvent, UnmutedEvent, VideoPlaybackQualityChangedEvent, WidevineConfig, usePlayer };