bitmovin-player-react-native 1.9.0 → 1.10.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 (79) hide show
  1. package/.eslintrc.js +11 -0
  2. package/CHANGELOG.md +25 -0
  3. package/android/build.gradle +2 -2
  4. package/android/src/main/java/com/bitmovin/player/reactnative/RNPlayerViewManager.kt +35 -1
  5. package/android/src/main/java/com/bitmovin/player/reactnative/converter/JsonConverter.kt +47 -28
  6. package/build/advertising.d.ts +3 -3
  7. package/build/advertising.js.map +1 -1
  8. package/build/components/PlayerView/events.d.ts +7 -1
  9. package/build/components/PlayerView/events.d.ts.map +1 -1
  10. package/build/components/PlayerView/events.js.map +1 -1
  11. package/build/components/PlayerView/index.d.ts.map +1 -1
  12. package/build/components/PlayerView/index.js +3 -3
  13. package/build/components/PlayerView/index.js.map +1 -1
  14. package/build/components/PlayerView/nativeEvents.d.ts +9 -1
  15. package/build/components/PlayerView/nativeEvents.d.ts.map +1 -1
  16. package/build/components/PlayerView/nativeEvents.js.map +1 -1
  17. package/build/drm/fairplayDrmApi.d.ts +21 -0
  18. package/build/drm/fairplayDrmApi.d.ts.map +1 -0
  19. package/build/drm/fairplayDrmApi.js +30 -0
  20. package/build/drm/fairplayDrmApi.js.map +1 -0
  21. package/build/drm/index.d.ts +9 -1
  22. package/build/drm/index.d.ts.map +1 -1
  23. package/build/drm/index.js +13 -0
  24. package/build/drm/index.js.map +1 -1
  25. package/build/events.d.ts +37 -3
  26. package/build/events.d.ts.map +1 -1
  27. package/build/events.js.map +1 -1
  28. package/build/metadata.d.ts.map +1 -1
  29. package/build/metadata.js.map +1 -1
  30. package/build/modules/SourceModule.d.ts +6 -0
  31. package/build/modules/SourceModule.d.ts.map +1 -1
  32. package/build/modules/SourceModule.js.map +1 -1
  33. package/build/network/index.js +4 -12
  34. package/build/network/index.js.map +1 -1
  35. package/build/offline/offlineContentManager.js +1 -1
  36. package/build/offline/offlineContentManager.js.map +1 -1
  37. package/build/offline/offlineContentManagerListener.d.ts.map +1 -1
  38. package/build/offline/offlineContentManagerListener.js.map +1 -1
  39. package/build/player.js +24 -24
  40. package/build/player.js.map +1 -1
  41. package/build/source.d.ts +6 -3
  42. package/build/source.d.ts.map +1 -1
  43. package/build/source.js +8 -5
  44. package/build/source.js.map +1 -1
  45. package/build/tweaksConfig.d.ts +8 -0
  46. package/build/tweaksConfig.d.ts.map +1 -1
  47. package/build/tweaksConfig.js.map +1 -1
  48. package/build/ui/custommessagehandlerbridge.d.ts.map +1 -1
  49. package/build/ui/custommessagehandlerbridge.js +4 -4
  50. package/build/ui/custommessagehandlerbridge.js.map +1 -1
  51. package/build/ui/fullscreenhandlerbridge.js +5 -5
  52. package/build/ui/fullscreenhandlerbridge.js.map +1 -1
  53. package/ios/Event+JSON.swift +20 -1
  54. package/ios/FairplayContentKeyRequestRegistry.swift +39 -0
  55. package/ios/NetworkModule.swift +1 -0
  56. package/ios/PlayerModule.swift +3 -3
  57. package/ios/RCTConvert+BitmovinPlayer.swift +1 -0
  58. package/ios/RNBitmovinPlayer.podspec +1 -1
  59. package/ios/RNPlayerView.swift +5 -0
  60. package/ios/RNPlayerViewManager.swift +2 -1
  61. package/ios/SourceModule.swift +24 -0
  62. package/package.json +2 -2
  63. package/src/advertising.ts +3 -3
  64. package/src/components/PlayerView/events.ts +7 -0
  65. package/src/components/PlayerView/index.tsx +3 -2
  66. package/src/components/PlayerView/nativeEvents.ts +9 -0
  67. package/src/drm/fairplayDrmApi.ts +36 -0
  68. package/src/drm/index.ts +14 -2
  69. package/src/events.ts +40 -3
  70. package/src/metadata.ts +2 -4
  71. package/src/modules/SourceModule.ts +10 -0
  72. package/src/network/index.ts +12 -12
  73. package/src/offline/offlineContentManager.ts +1 -1
  74. package/src/offline/offlineContentManagerListener.ts +3 -6
  75. package/src/player.ts +24 -24
  76. package/src/source.ts +9 -6
  77. package/src/tweaksConfig.ts +8 -0
  78. package/src/ui/custommessagehandlerbridge.ts +7 -4
  79. package/src/ui/fullscreenhandlerbridge.ts +5 -5
package/.eslintrc.js CHANGED
@@ -1,7 +1,18 @@
1
1
  module.exports = {
2
+ root: true,
2
3
  extends: ['expo', 'prettier'],
3
4
  plugins: ['prettier'],
5
+ overrides: [
6
+ {
7
+ files: ['**/*.ts', '**/*.tsx'],
8
+ parserOptions: {
9
+ project: './tsconfig.json',
10
+ tsconfigRootDir: __dirname,
11
+ },
12
+ },
13
+ ],
4
14
  rules: {
15
+ '@typescript-eslint/no-floating-promises': 'error',
5
16
  'prettier/prettier': 'error',
6
17
  },
7
18
  };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.10.0] - 2026-02-27
4
+
5
+ ### Changed
6
+
7
+ - Update Bitmovin's native iOS SDK version to `3.108.1`
8
+ - Update Bitmovin's native Android SDK version to `3.143.0+jason`
9
+ - Update Expo SDK version to `53.0.26`
10
+
11
+ ### Fixed
12
+
13
+ - iOS, tvOS: defaultMetadata from analyticsConfig was not applied when initializing a player with analytics
14
+ - Correctly await DRM teardown before releasing OfflineContentManager native resources
15
+ - Android: stabilize PlayerView ownership handoff in RNPlayerViewManager during rapid view transitions (e.g. fullscreen/modal re-mounts) to avoid rendering instability
16
+
17
+ ### Added
18
+
19
+ - Android: TweaksConfig option `enableDrmLicenseRenewRetry` to retry renewing a DRM license when the first renewal attempt fails
20
+ - Android/iOS: Expose `DeficiencyData` on error and warning events, providing additional diagnostic information such as the HTTP response body when a network request (e.g. DRM license) fails
21
+ - iOS, tvOS: `onFairplayLicenseAcquired` player event, providing the `contentKeyRequest` of the acquired FairPlay license
22
+ - iOS, tvOS: `Source.drm.fairplay.renewExpiringLicense` method to proactively renew an expiring FairPlay license using the `contentKeyRequest` from a `FairplayLicenseAcquiredEvent`
23
+
3
24
  ## [1.9.0] - 2026-02-13
4
25
 
5
26
  ### Changed
@@ -41,6 +62,10 @@
41
62
  - iOS: Expo config `Features.googleCastSDK.ios` object property `messageNamespace`
42
63
  - Expo config `Features.googleCastSDK` object properties `appId` and `messageNamespace` (in case the Android and iOS properties are the same)
43
64
 
65
+ ### Known Issues
66
+
67
+ - Event handlers can fail to fire in some setups, notably on Android with Paper (old architecture). This affects versions `1.0.0` to `1.8.x` and is fixed in `1.9.0`.
68
+
44
69
  ## [1.7.0] - 2026-01-15
45
70
 
46
71
  ### 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.141.0+jason'
112
- implementation 'com.bitmovin.player:player-media-session:3.141.0+jason'
111
+ implementation 'com.bitmovin.player:player:3.143.0+jason'
112
+ implementation 'com.bitmovin.player:player-media-session:3.143.0+jason'
113
113
  }
@@ -1,7 +1,6 @@
1
1
  package com.bitmovin.player.reactnative
2
2
 
3
3
  import android.os.Build
4
- import android.util.Log
5
4
  import com.bitmovin.player.reactnative.converter.toPictureInPictureActions
6
5
  import com.bitmovin.player.reactnative.converter.toRNPlayerViewConfigWrapper
7
6
  import com.bitmovin.player.reactnative.extensions.getBooleanOrNull
@@ -15,10 +14,16 @@ import java.util.WeakHashMap
15
14
  class RNPlayerViewManager : Module() {
16
15
  // Weak Set
17
16
  private val autoPictureInPictureViews = Collections.newSetFromMap(WeakHashMap<RNPlayerView, Boolean>())
17
+ private val activePlayerViewsToPlayerIds = WeakHashMap<RNPlayerView, NativeId>()
18
18
 
19
19
  override fun definition() = ModuleDefinition {
20
20
  Name("RNPlayerViewManager")
21
21
 
22
+ OnDestroy {
23
+ autoPictureInPictureViews.clear()
24
+ activePlayerViewsToPlayerIds.clear()
25
+ }
26
+
22
27
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
23
28
  // On version S or above this is handled with the PiP Parameters in the `PictureInPictureHandler`
24
29
  OnUserLeavesActivity {
@@ -29,6 +34,7 @@ class RNPlayerViewManager : Module() {
29
34
  View(RNPlayerView::class) {
30
35
  OnViewDestroys { view: RNPlayerView ->
31
36
  autoPictureInPictureViews.remove(view)
37
+ unregisterView(view)
32
38
  view.dispose()
33
39
  }
34
40
 
@@ -41,6 +47,21 @@ class RNPlayerViewManager : Module() {
41
47
  playerInfo.getBooleanOrNull("isPictureInPictureEnabledOnPlayer") ?: false
42
48
  val userInterfaceTypeName = playerInfo.getString("userInterfaceTypeName")
43
49
  val playerViewConfigWrapper = playerInfo.getMap("playerViewConfig")?.toRNPlayerViewConfigWrapper()
50
+
51
+ // If another RNPlayerView currently owns the same playerId, dispose it first.
52
+ // This can happen during rapid view hierarchy transitions (e.g. fullscreen/modal
53
+ // re-mounts), where React may mount a new native view before unmounting the old one.
54
+ // Disposing first guarantees old-view teardown happens before attaching the new view,
55
+ // preventing attach-detach races.
56
+ val previousView = activePlayerViewsToPlayerIds.entries
57
+ .firstOrNull { it.value == playerId }
58
+ ?.key
59
+ if (previousView != null && previousView !== view) {
60
+ autoPictureInPictureViews.remove(previousView)
61
+ unregisterView(previousView)
62
+ previousView.dispose()
63
+ }
64
+
44
65
  view.attachPlayer(
45
66
  playerId,
46
67
  playerViewConfigWrapper,
@@ -49,6 +70,7 @@ class RNPlayerViewManager : Module() {
49
70
  isPictureInPictureEnabledOnPlayer,
50
71
  userInterfaceTypeName,
51
72
  )
73
+ registerViewForPlayer(view, playerId)
52
74
  updateAutoPictureInPictureRegistration(view)
53
75
  }
54
76
 
@@ -140,6 +162,18 @@ class RNPlayerViewManager : Module() {
140
162
  }
141
163
  }
142
164
 
165
+ private fun registerViewForPlayer(view: RNPlayerView, playerId: NativeId) {
166
+ // Keep a single ownership mapping by removing entries for this view and for this playerId.
167
+ activePlayerViewsToPlayerIds.entries.removeAll { (trackedView, trackedPlayerId) ->
168
+ trackedView === view || trackedPlayerId == playerId
169
+ }
170
+ activePlayerViewsToPlayerIds[view] = playerId
171
+ }
172
+
173
+ private fun unregisterView(view: RNPlayerView) {
174
+ activePlayerViewsToPlayerIds.remove(view)
175
+ }
176
+
143
177
  private fun updateAutoPictureInPictureRegistration(view: RNPlayerView) {
144
178
  if (view.shouldEnterPictureInPictureOnBackground()) {
145
179
  autoPictureInPictureViews.add(view)
@@ -59,6 +59,7 @@ import com.bitmovin.player.api.metadata.id3.PrivFrame
59
59
  import com.bitmovin.player.api.metadata.id3.TextInformationFrame
60
60
  import com.bitmovin.player.api.metadata.id3.UrlLinkFrame
61
61
  import com.bitmovin.player.api.metadata.scte.ScteMessage
62
+ import com.bitmovin.player.api.deficiency.DeficiencyData
62
63
  import com.bitmovin.player.api.network.HttpRequest
63
64
  import com.bitmovin.player.api.network.HttpRequestType
64
65
  import com.bitmovin.player.api.network.HttpResponse
@@ -181,34 +182,40 @@ private fun String.toForceReuseVideoCodecReason(): ForceReuseVideoCodecReason? =
181
182
  else -> null
182
183
  }
183
184
 
184
- fun Map<String, Any?>.toTweaksConfig(): TweaksConfig = TweaksConfig().apply {
185
- withDouble("timeChangedInterval") { timeChangedInterval = it }
186
- withInt("bandwidthEstimateWeightLimit") {
187
- bandwidthMeterType = BandwidthMeterType.Default(
188
- bandwidthEstimateWeightLimit = it,
189
- )
190
- }
191
- withMap("devicesThatRequireSurfaceWorkaround") { devices ->
192
- val deviceNames = devices.withStringArray("deviceNames") {
193
- it.filterNotNull().map(::DeviceName)
194
- } ?: emptyList()
195
- val modelNames = devices.withStringArray("modelNames") {
196
- it.filterNotNull().map(::DeviceName)
197
- } ?: emptyList()
198
- devicesThatRequireSurfaceWorkaround = deviceNames + modelNames
199
- }
200
- withBoolean("languagePropertyNormalization") { languagePropertyNormalization = it }
201
- withDouble("localDynamicDashWindowUpdateInterval") { localDynamicDashWindowUpdateInterval = it }
202
- withBoolean("useDrmSessionForClearPeriods") { useDrmSessionForClearPeriods = it }
203
- withBoolean("useDrmSessionForClearSources") { useDrmSessionForClearSources = it }
204
- withBoolean("useFiletypeExtractorFallbackForHls") { useFiletypeExtractorFallbackForHls = it }
205
- withStringArray("forceReuseVideoCodecReasons") {
206
- forceReuseVideoCodecReasons = it
207
- .filterNotNull()
208
- .mapNotNull(String::toForceReuseVideoCodecReason)
209
- .toSet()
210
- }
211
- }
185
+ fun Map<String, Any?>.toTweaksConfig(): TweaksConfig =
186
+ TweaksConfig.Builder().apply {
187
+ withBoolean("enableDrmLicenseRenewRetry") { setEnableDrmLicenseRenewRetry(it) }
188
+ withDouble("timeChangedInterval") { setTimeChangedInterval(it) }
189
+ withInt("bandwidthEstimateWeightLimit") {
190
+ setBandwidthMeterType(
191
+ BandwidthMeterType.Default(
192
+ bandwidthEstimateWeightLimit = it,
193
+ )
194
+ )
195
+ }
196
+ withMap("devicesThatRequireSurfaceWorkaround") { devices ->
197
+ val deviceNames = devices.withStringArray("deviceNames") {
198
+ it.filterNotNull().map(::DeviceName)
199
+ } ?: emptyList()
200
+ val modelNames = devices.withStringArray("modelNames") {
201
+ it.filterNotNull().map(::DeviceName)
202
+ } ?: emptyList()
203
+ setDevicesThatRequireSurfaceWorkaround(deviceNames + modelNames)
204
+ }
205
+ withBoolean("languagePropertyNormalization") { setLanguagePropertyNormalization(it) }
206
+ withDouble("localDynamicDashWindowUpdateInterval") { setLocalDynamicDashWindowUpdateInterval(it) }
207
+ withBoolean("useDrmSessionForClearPeriods") { setUseDrmSessionForClearPeriods(it) }
208
+ withBoolean("useDrmSessionForClearSources") { setUseDrmSessionForClearSources(it) }
209
+ withBoolean("useFiletypeExtractorFallbackForHls") { setUseFiletypeExtractorFallbackForHls(it) }
210
+ withStringArray("forceReuseVideoCodecReasons") {
211
+ setForceReuseVideoCodecReasons(
212
+ it
213
+ .filterNotNull()
214
+ .mapNotNull(String::toForceReuseVideoCodecReason)
215
+ .toSet()
216
+ )
217
+ }
218
+ }.build()
212
219
 
213
220
  fun Map<String, Any?>.toAdvertisingConfig(): AdvertisingConfig? {
214
221
  val schedule = getArray("schedule")?.toMapList()?.mapNotNull { it?.toAdItem() } ?: emptyList()
@@ -315,11 +322,13 @@ fun SourceEvent.toJson(): Map<String, Any> {
315
322
  is SourceEvent.Error -> {
316
323
  baseMap["code"] = code.value
317
324
  baseMap["message"] = message
325
+ deficiencyData?.toJson()?.let { baseMap["data"] = it }
318
326
  }
319
327
 
320
328
  is SourceEvent.Warning -> {
321
329
  baseMap["code"] = code.value
322
330
  baseMap["message"] = message
331
+ deficiencyData?.toJson()?.let { baseMap["data"] = it }
323
332
  }
324
333
 
325
334
  is SourceEvent.AudioTrackAdded -> {
@@ -387,11 +396,13 @@ fun PlayerEvent.toJson(): Map<String, Any> {
387
396
  is PlayerEvent.Error -> {
388
397
  baseMap["code"] = code.value
389
398
  baseMap["message"] = message
399
+ deficiencyData?.toJson()?.let { baseMap["data"] = it }
390
400
  }
391
401
 
392
402
  is PlayerEvent.Warning -> {
393
403
  baseMap["code"] = code.value
394
404
  baseMap["message"] = message
405
+ deficiencyData?.toJson()?.let { baseMap["data"] = it }
395
406
  }
396
407
 
397
408
  is PlayerEvent.Play -> {
@@ -830,6 +841,14 @@ fun HttpResponse.toJson(): Map<String, Any> = mapOf(
830
841
 
831
842
  fun HttpRequestType.toJson(): String = toString()
832
843
 
844
+ fun DeficiencyData.toJson(): Map<String, Any> {
845
+ val json = mutableMapOf<String, Any>()
846
+ if (this is DeficiencyData.Network) {
847
+ json["httpResponse"] = httpResponse.toJson()
848
+ }
849
+ return json
850
+ }
851
+
833
852
  fun MediaType.toJson(): String = when (this) {
834
853
  MediaType.Audio -> "audio"
835
854
  MediaType.Video -> "video"
@@ -60,9 +60,9 @@ export interface AdItem {
60
60
  * Possible values are:
61
61
  * • "pre": pre-roll ad (for VoD and Live streaming)
62
62
  * • "post": post-roll ad (for VoD streaming only)
63
- * • fractional seconds: "10", "12.5" (mid-roll ad, for VoD and Live streaming)
64
- * • percentage of the entire video duration: "25%", "50%" (mid-roll ad, for VoD streaming only)
65
- * • timecode hh:mm:ss.mmm: "00:10:30.000", "01:00:00.000" (mid-roll ad, for VoD streaming only)
63
+ * • fractional seconds: "10", "12.5" (mid-roll ad, for VoD and Live streaming)
64
+ * • percentage of the entire video duration: "25%", "50%" (mid-roll ad, for VoD streaming only)
65
+ * • timecode hh:mm:ss.mmm: "00:10:30.000", "01:00:00.000" (mid-roll ad, for VoD streaming only)
66
66
  */
67
67
  position?: string;
68
68
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"advertising.js","sourceRoot":"","sources":["../src/advertising.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;OAEG;IACH,6BAAe,CAAA;IACf;;OAEG;IACH,qCAAuB,CAAA;IACvB;;OAEG;IACH,6BAAe,CAAA;AACjB,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,mCAAmB,CAAA;IACnB;;OAEG;IACH,2CAA2B,CAAA;AAC7B,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB","sourcesContent":["/**\n * Quartiles that can be reached during an ad playback.\n */\nexport enum AdQuartile {\n /**\n * Fist ad quartile.\n */\n FIRST = 'first',\n /**\n * Mid ad quartile.\n */\n MID_POINT = 'mid_point',\n /**\n * Third ad quartile.\n */\n THIRD = 'third',\n}\n\n/**\n * The possible types an `AdSource` can be.\n */\nexport enum AdSourceType {\n /**\n * Google Interactive Media Ads.\n */\n IMA = 'ima',\n /**\n * Unknown ad source type.\n */\n UNKNOWN = 'unknown',\n /**\n * Progressive ad type.\n */\n PROGRESSIVE = 'progressive',\n}\n\n/**\n * Represents an ad source which can be assigned to an `AdItem`. An `AdItem` can have multiple `AdSource`s\n * as waterfalling option.\n */\nexport interface AdSource {\n /**\n * The ad tag / url to the ad manifest.\n */\n tag: string;\n /**\n * The `AdSourceType` of this `AdSource`.\n */\n type: AdSourceType;\n}\n\n/**\n * Represents an ad break which can be scheduled for playback.\n *\n * One single `AdItem` can have multiple `AdSource`s where all but the first act as fallback ad sources\n * if the first one fails to load. The start and end of an ad break are signaled via `AdBreakStartedEvent`\n * and `AdBreakFinishedEvent`.\n */\nexport interface AdItem {\n /**\n * The playback position at which the ad break is scheduled to start. Default value is \"pre\".\n *\n * Possible values are:\n * • \"pre\": pre-roll ad (for VoD and Live streaming)\n * • \"post\": post-roll ad (for VoD streaming only)\n * • fractional seconds: \"10\", \"12.5\" (mid-roll ad, for VoD and Live streaming)\n * • percentage of the entire video duration: \"25%\", \"50%\" (mid-roll ad, for VoD streaming only)\n * • timecode hh:mm:ss.mmm: \"00:10:30.000\", \"01:00:00.000\" (mid-roll ad, for VoD streaming only)\n */\n position?: string;\n /**\n * The `AdSource`s that make up this `AdItem`. The first ad source in this array is used as the main ad.\n * Subsequent ad sources act as a fallback, meaning that if the main ad source does not provide a\n * valid response, the subsequent ad sources will be utilized one after another.\n *\n * The fallback ad sources need to have the same `AdSourceType` as the main ad source.\n */\n sources: AdSource[];\n\n /**\n * The amount of seconds the ad manifest is loaded in advance\n * compared to when the ad break is scheduled for playback.\n *\n * Default value is 0.0\n *\n * @platform Android\n */\n preloadOffset?: number;\n}\n\n/**\n * Contains configuration values regarding the ads which should be played back by the player.\n */\nexport interface AdvertisingConfig {\n /**\n * The ad items that are scheduled when a new playback session is started via `Player.load()`.\n */\n schedule: AdItem[];\n /**\n * Configuration to customize Google IMA SDK integration.\n */\n ima?: ImaAdvertisingConfig;\n}\n\n/**\n * Configuration options applied to Google IMA SDK before initialization.\n */\nexport interface ImaAdvertisingConfig {\n /**\n * Invoked before the IMA SDK initializes, allowing mutation of the SDK settings.\n *\n * @param settings - Current IMA settings received from the native SDK.\n * @returns The settings object to apply. If omitted, the (mutated) `settings` argument is used.\n */\n beforeInitialization?: (settings: ImaSettings) => ImaSettings | void;\n}\n\n/**\n * Represents Google IMA SDK wide settings.\n */\nexport interface ImaSettings {\n /**\n * Publisher Provided Identification (PPID) sent with ad requests.\n */\n ppid?: string;\n /**\n * Language identifier in IETF BCP 47 format.\n */\n language: string;\n /**\n * Maximum allowed wrapper redirects. Default is `4`.\n */\n maxRedirects: number;\n /**\n * Enables background audio playback. Defaults to `false`.\n *\n * @platform iOS, tvOS\n */\n enableBackgroundPlayback?: boolean;\n /**\n * Player version identifier reported to IMA.\n */\n playerVersion?: string;\n /**\n * Session identifier used for frequency capping.\n */\n sessionId?: string;\n /**\n * Controls Same App Key usage.\n *\n * @platform iOS\n */\n sameAppKeyEnabled?: boolean;\n}\n\n/**\n * Contains the base configuration options for an ad.\n */\nexport interface AdConfig {\n /**\n * Specifies how many seconds of the main video content should be replaced by ad break(s).\n */\n replaceContentDuration: number;\n}\n\n/**\n * Holds various additional ad data.\n */\nexport interface AdData {\n /**\n * The average bitrate of the progressive media file as defined in the VAST response.\n */\n bitrate?: number;\n /**\n * The maximum bitrate of the streaming media file as defined in the VAST response.\n */\n maxBitrate?: number;\n /**\n * The MIME type of the media file or creative as defined in the VAST response.\n */\n mimeType?: string;\n /**\n * The minimum bitrate of the streaming media file as defined in the VAST response.\n */\n minBitrate?: number;\n}\n\n/**\n * Defines basic properties available for every ad type.\n */\nexport interface Ad {\n /**\n * The url the user should be redirected to when clicking the ad.\n */\n clickThroughUrl?: string;\n /**\n * Holds various additional `AdData`.\n */\n data?: AdData;\n /**\n * The height of the ad.\n */\n height: number;\n /**\n * Identifier for the ad. This might be autogenerated.\n */\n id?: string;\n /**\n * Determines whether an ad is linear, i.e. playback of main content needs to be paused for the ad.\n */\n isLinear: boolean;\n /**\n * The corresponding media file url for the ad.\n */\n mediaFileUrl?: string;\n /**\n * The width of the ad.\n */\n width: number;\n}\n\n/**\n * Contains information about an ad break.\n */\nexport interface AdBreak {\n /**\n * The ads scheduled for this `AdBreak`.\n */\n ads: Ad[];\n /**\n * The id of the corresponding `AdBreakConfig`. This will be auto-generated.\n */\n id: string;\n /**\n * The time in seconds in the media timeline the `AdBreak` is scheduled for.\n */\n scheduleTime: number;\n}\n"]}
1
+ {"version":3,"file":"advertising.js","sourceRoot":"","sources":["../src/advertising.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;OAEG;IACH,6BAAe,CAAA;IACf;;OAEG;IACH,qCAAuB,CAAA;IACvB;;OAEG;IACH,6BAAe,CAAA;AACjB,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,2BAAW,CAAA;IACX;;OAEG;IACH,mCAAmB,CAAA;IACnB;;OAEG;IACH,2CAA2B,CAAA;AAC7B,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB","sourcesContent":["/**\n * Quartiles that can be reached during an ad playback.\n */\nexport enum AdQuartile {\n /**\n * Fist ad quartile.\n */\n FIRST = 'first',\n /**\n * Mid ad quartile.\n */\n MID_POINT = 'mid_point',\n /**\n * Third ad quartile.\n */\n THIRD = 'third',\n}\n\n/**\n * The possible types an `AdSource` can be.\n */\nexport enum AdSourceType {\n /**\n * Google Interactive Media Ads.\n */\n IMA = 'ima',\n /**\n * Unknown ad source type.\n */\n UNKNOWN = 'unknown',\n /**\n * Progressive ad type.\n */\n PROGRESSIVE = 'progressive',\n}\n\n/**\n * Represents an ad source which can be assigned to an `AdItem`. An `AdItem` can have multiple `AdSource`s\n * as waterfalling option.\n */\nexport interface AdSource {\n /**\n * The ad tag / url to the ad manifest.\n */\n tag: string;\n /**\n * The `AdSourceType` of this `AdSource`.\n */\n type: AdSourceType;\n}\n\n/**\n * Represents an ad break which can be scheduled for playback.\n *\n * One single `AdItem` can have multiple `AdSource`s where all but the first act as fallback ad sources\n * if the first one fails to load. The start and end of an ad break are signaled via `AdBreakStartedEvent`\n * and `AdBreakFinishedEvent`.\n */\nexport interface AdItem {\n /**\n * The playback position at which the ad break is scheduled to start. Default value is \"pre\".\n *\n * Possible values are:\n * • \"pre\": pre-roll ad (for VoD and Live streaming)\n * • \"post\": post-roll ad (for VoD streaming only)\n * • fractional seconds: \"10\", \"12.5\" (mid-roll ad, for VoD and Live streaming)\n * • percentage of the entire video duration: \"25%\", \"50%\" (mid-roll ad, for VoD streaming only)\n * • timecode hh:mm:ss.mmm: \"00:10:30.000\", \"01:00:00.000\" (mid-roll ad, for VoD streaming only)\n */\n position?: string;\n /**\n * The `AdSource`s that make up this `AdItem`. The first ad source in this array is used as the main ad.\n * Subsequent ad sources act as a fallback, meaning that if the main ad source does not provide a\n * valid response, the subsequent ad sources will be utilized one after another.\n *\n * The fallback ad sources need to have the same `AdSourceType` as the main ad source.\n */\n sources: AdSource[];\n\n /**\n * The amount of seconds the ad manifest is loaded in advance\n * compared to when the ad break is scheduled for playback.\n *\n * Default value is 0.0\n *\n * @platform Android\n */\n preloadOffset?: number;\n}\n\n/**\n * Contains configuration values regarding the ads which should be played back by the player.\n */\nexport interface AdvertisingConfig {\n /**\n * The ad items that are scheduled when a new playback session is started via `Player.load()`.\n */\n schedule: AdItem[];\n /**\n * Configuration to customize Google IMA SDK integration.\n */\n ima?: ImaAdvertisingConfig;\n}\n\n/**\n * Configuration options applied to Google IMA SDK before initialization.\n */\nexport interface ImaAdvertisingConfig {\n /**\n * Invoked before the IMA SDK initializes, allowing mutation of the SDK settings.\n *\n * @param settings - Current IMA settings received from the native SDK.\n * @returns The settings object to apply. If omitted, the (mutated) `settings` argument is used.\n */\n beforeInitialization?: (settings: ImaSettings) => ImaSettings | void;\n}\n\n/**\n * Represents Google IMA SDK wide settings.\n */\nexport interface ImaSettings {\n /**\n * Publisher Provided Identification (PPID) sent with ad requests.\n */\n ppid?: string;\n /**\n * Language identifier in IETF BCP 47 format.\n */\n language: string;\n /**\n * Maximum allowed wrapper redirects. Default is `4`.\n */\n maxRedirects: number;\n /**\n * Enables background audio playback. Defaults to `false`.\n *\n * @platform iOS, tvOS\n */\n enableBackgroundPlayback?: boolean;\n /**\n * Player version identifier reported to IMA.\n */\n playerVersion?: string;\n /**\n * Session identifier used for frequency capping.\n */\n sessionId?: string;\n /**\n * Controls Same App Key usage.\n *\n * @platform iOS\n */\n sameAppKeyEnabled?: boolean;\n}\n\n/**\n * Contains the base configuration options for an ad.\n */\nexport interface AdConfig {\n /**\n * Specifies how many seconds of the main video content should be replaced by ad break(s).\n */\n replaceContentDuration: number;\n}\n\n/**\n * Holds various additional ad data.\n */\nexport interface AdData {\n /**\n * The average bitrate of the progressive media file as defined in the VAST response.\n */\n bitrate?: number;\n /**\n * The maximum bitrate of the streaming media file as defined in the VAST response.\n */\n maxBitrate?: number;\n /**\n * The MIME type of the media file or creative as defined in the VAST response.\n */\n mimeType?: string;\n /**\n * The minimum bitrate of the streaming media file as defined in the VAST response.\n */\n minBitrate?: number;\n}\n\n/**\n * Defines basic properties available for every ad type.\n */\nexport interface Ad {\n /**\n * The url the user should be redirected to when clicking the ad.\n */\n clickThroughUrl?: string;\n /**\n * Holds various additional `AdData`.\n */\n data?: AdData;\n /**\n * The height of the ad.\n */\n height: number;\n /**\n * Identifier for the ad. This might be autogenerated.\n */\n id?: string;\n /**\n * Determines whether an ad is linear, i.e. playback of main content needs to be paused for the ad.\n */\n isLinear: boolean;\n /**\n * The corresponding media file url for the ad.\n */\n mediaFileUrl?: string;\n /**\n * The width of the ad.\n */\n width: number;\n}\n\n/**\n * Contains information about an ad break.\n */\nexport interface AdBreak {\n /**\n * The ads scheduled for this `AdBreak`.\n */\n ads: Ad[];\n /**\n * The id of the corresponding `AdBreakConfig`. This will be auto-generated.\n */\n id: string;\n /**\n * The time in seconds in the media timeline the `AdBreak` is scheduled for.\n */\n scheduleTime: number;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdErrorEvent, AdFinishedEvent, AdManifestLoadedEvent, AdManifestLoadEvent, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdStartedEvent, CastAvailableEvent, CastPausedEvent, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartedEvent, CastStartEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, DestroyEvent, Event, FullscreenEnabledEvent, FullscreenDisabledEvent, FullscreenEnterEvent, FullscreenExitEvent, MutedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlaybackFinishedEvent, PlayerActiveEvent, PlayerErrorEvent, PlayerWarningEvent, PlayEvent, PlayingEvent, ReadyEvent, SeekedEvent, SeekEvent, TimeShiftEvent, TimeShiftedEvent, StallStartedEvent, StallEndedEvent, SourceErrorEvent, SourceLoadedEvent, SourceLoadEvent, SourceUnloadedEvent, SourceWarningEvent, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleRemovedEvent, TimeChangedEvent, UnmutedEvent, VideoPlaybackQualityChangedEvent, DownloadFinishedEvent, VideoDownloadQualityChangedEvent, PlaybackSpeedChangedEvent, CueEnterEvent, CueExitEvent, MetadataParsedEvent, MetadataEvent } from '../../events';
1
+ import { AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdErrorEvent, AdFinishedEvent, AdManifestLoadedEvent, AdManifestLoadEvent, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdStartedEvent, CastAvailableEvent, CastPausedEvent, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartedEvent, CastStartEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, DestroyEvent, Event, FullscreenEnabledEvent, FullscreenDisabledEvent, FullscreenEnterEvent, FullscreenExitEvent, MutedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlaybackFinishedEvent, PlayerActiveEvent, PlayerErrorEvent, PlayerWarningEvent, PlayEvent, PlayingEvent, ReadyEvent, SeekedEvent, SeekEvent, TimeShiftEvent, TimeShiftedEvent, StallStartedEvent, StallEndedEvent, SourceErrorEvent, SourceLoadedEvent, SourceLoadEvent, SourceUnloadedEvent, SourceWarningEvent, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleRemovedEvent, TimeChangedEvent, UnmutedEvent, VideoPlaybackQualityChangedEvent, DownloadFinishedEvent, VideoDownloadQualityChangedEvent, PlaybackSpeedChangedEvent, CueEnterEvent, CueExitEvent, MetadataParsedEvent, MetadataEvent, FairplayLicenseAcquiredEvent } from '../../events';
2
2
  /**
3
3
  * Event props for `PlayerView`.
4
4
  *
@@ -314,5 +314,11 @@ export type PlayerViewEvents = {
314
314
  * Emitted when the current video playback quality has changed.
315
315
  */
316
316
  onVideoPlaybackQualityChanged?: (event: VideoPlaybackQualityChangedEvent) => void;
317
+ /**
318
+ * Emitted when a FairPlay license has been acquired successfully.
319
+ *
320
+ * @platform iOS, tvOS
321
+ */
322
+ onFairplayLicenseAcquired?: (event: FairplayLicenseAcquiredEvent) => void;
317
323
  };
318
324
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/components/PlayerView/events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,yBAAyB,EACzB,YAAY,EACZ,KAAK,EACL,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,wCAAwC,EACxC,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAq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AChD;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD;;OAEG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACxD;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACtD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C;;OAEG;IACH,6BAA6B,CAAC,EAAE,CAC9B,KAAK,EAAE,gCAAgC,KACpC,IAAI,CAAC;IACV;;OAEG;IACH,6BAA6B,CAAC,EAAE,CAC9B,KAAK,EAAE,gCAAgC,KACpC,IAAI,CAAC;CACX,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/components/PlayerView/events.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,q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AS,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C;;OAEG;IACH,6BAA6B,CAAC,EAAE,CAC9B,KAAK,EAAE,gCAAgC,KACpC,IAAI,CAAC;IACV;;OAEG;IACH,6BAA6B,CAAC,EAAE,CAC9B,KAAK,EAAE,gCAAgC,KACpC,IAAI,CAAC;IACV;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,CAAC,KAAK,EAAE,4BAA4B,KAAK,IAAI,CAAC;CAC3E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/components/PlayerView/events.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AdBreakFinishedEvent,\n AdBreakStartedEvent,\n AdClickedEvent,\n AdErrorEvent,\n AdFinishedEvent,\n AdManifestLoadedEvent,\n AdManifestLoadEvent,\n AdQuartileEvent,\n AdScheduledEvent,\n AdSkippedEvent,\n AdStartedEvent,\n CastAvailableEvent,\n CastPausedEvent,\n CastPlaybackFinishedEvent,\n CastPlayingEvent,\n CastStartedEvent,\n CastStartEvent,\n CastStoppedEvent,\n CastTimeUpdatedEvent,\n CastWaitingForDeviceEvent,\n DestroyEvent,\n Event,\n FullscreenEnabledEvent,\n FullscreenDisabledEvent,\n FullscreenEnterEvent,\n FullscreenExitEvent,\n MutedEvent,\n PausedEvent,\n PictureInPictureAvailabilityChangedEvent,\n PictureInPictureEnterEvent,\n PictureInPictureEnteredEvent,\n PictureInPictureExitEvent,\n PictureInPictureExitedEvent,\n PlaybackFinishedEvent,\n PlayerActiveEvent,\n PlayerErrorEvent,\n PlayerWarningEvent,\n PlayEvent,\n PlayingEvent,\n ReadyEvent,\n SeekedEvent,\n SeekEvent,\n TimeShiftEvent,\n TimeShiftedEvent,\n StallStartedEvent,\n StallEndedEvent,\n SourceErrorEvent,\n SourceLoadedEvent,\n SourceLoadEvent,\n SourceUnloadedEvent,\n SourceWarningEvent,\n AudioAddedEvent,\n AudioChangedEvent,\n AudioRemovedEvent,\n SubtitleAddedEvent,\n SubtitleChangedEvent,\n SubtitleRemovedEvent,\n TimeChangedEvent,\n UnmutedEvent,\n VideoPlaybackQualityChangedEvent,\n DownloadFinishedEvent,\n VideoDownloadQualityChangedEvent,\n PlaybackSpeedChangedEvent,\n CueEnterEvent,\n CueExitEvent,\n MetadataParsedEvent,\n MetadataEvent,\n} from '../../events';\n\n/**\n * Event props for `PlayerView`.\n *\n * Note the events of `PlayerView` are simply a proxy over\n * the events from `NativePlayerView` just removing RN's bubbling data.\n */\nexport type PlayerViewEvents = {\n /**\n * Event emitted when an ad break has finished.\n */\n onAdBreakFinished?: (event: AdBreakFinishedEvent) => void;\n /**\n * Event emitted when an ad break has started.\n */\n onAdBreakStarted?: (event: AdBreakStartedEvent) => void;\n /**\n * Event emitted when an ad has been clicked.\n */\n onAdClicked?: (event: AdClickedEvent) => void;\n /**\n * Event emitted when an ad error has occurred.\n */\n onAdError?: (event: AdErrorEvent) => void;\n /**\n * Event emitted when an ad has finished.\n */\n onAdFinished?: (event: AdFinishedEvent) => void;\n /**\n * Event emitted when an ad manifest starts loading.\n */\n onAdManifestLoad?: (event: AdManifestLoadEvent) => void;\n /**\n * Event emitted when an ad manifest has been loaded.\n */\n onAdManifestLoaded?: (event: AdManifestLoadedEvent) => void;\n /**\n * Event emitted when an ad quartile has been reached.\n */\n onAdQuartile?: (event: AdQuartileEvent) => void;\n /**\n * Event emitted when an ad has been scheduled.\n */\n onAdScheduled?: (event: AdScheduledEvent) => void;\n /**\n * Event emitted when an ad has been skipped.\n */\n onAdSkipped?: (event: AdSkippedEvent) => void;\n /**\n * Event emitted when an ad has started.\n */\n onAdStarted?: (event: AdStartedEvent) => void;\n /**\n * Event emitted when casting to a cast-compatible device is available.\n *\n * @platform iOS, Android\n */\n onCastAvailable?: (event: CastAvailableEvent) => void;\n /**\n * Event emitted when the playback on a cast-compatible device was paused.\n *\n * @platform iOS, Android\n */\n onCastPaused?: (event: CastPausedEvent) => void;\n /**\n * Event emitted when the playback on a cast-compatible device has finished.\n *\n * @platform iOS, Android\n */\n onCastPlaybackFinished?: (event: CastPlaybackFinishedEvent) => void;\n /**\n * Event emitted when playback on a cast-compatible device has started.\n *\n * @platform iOS, Android\n */\n onCastPlaying?: (event: CastPlayingEvent) => void;\n /**\n * Event emitted when the cast app is launched successfully.\n *\n * @platform iOS, Android\n */\n onCastStarted?: (event: CastStartedEvent) => void;\n /**\n * Event emitted when casting is initiated, but the user still needs to choose which device should be used.\n *\n * @platform iOS, Android\n */\n onCastStart?: (event: CastStartEvent) => void;\n /**\n * Event emitted when casting to a cast-compatible device is stopped.\n *\n * @platform iOS, Android\n */\n onCastStopped?: (event: CastStoppedEvent) => void;\n /**\n * Event emitted when the time update from the currently used cast-compatible device is received.\n *\n * @platform iOS, Android\n */\n onCastTimeUpdated?: (event: CastTimeUpdatedEvent) => void;\n /**\n * Event emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for\n * playback.\n *\n * @platform iOS, Android\n */\n onCastWaitingForDevice?: (event: CastWaitingForDeviceEvent) => void;\n /**\n * Event emitted when a subtitle entry transitions into the active status.\n */\n onCueEnter?: (event: CueEnterEvent) => void;\n /**\n * Event emitted when an active subtitle entry transitions into the inactive status.\n */\n onCueExit?: (event: CueExitEvent) => void;\n /**\n * Event emitted when the player is destroyed.\n */\n onDestroy?: (event: DestroyEvent) => void;\n /**\n * Emitted when a download was finished.\n */\n onDownloadFinished?: (event: DownloadFinishedEvent) => void;\n /**\n * All events emitted by the player.\n */\n onEvent?: (event: Event) => void;\n /**\n * Event emitted when fullscreen mode has been enabled.\n *\n * @platform iOS, Android\n */\n onFullscreenEnabled?: (event: FullscreenEnabledEvent) => void;\n /**\n * Event emitted when fullscreen mode has been disabled.\n *\n * @platform iOS, Android\n */\n onFullscreenDisabled?: (event: FullscreenDisabledEvent) => void;\n /**\n * Event emitted when fullscreen mode has been entered.\n *\n * @platform iOS, Android\n */\n onFullscreenEnter?: (event: FullscreenEnterEvent) => void;\n /**\n * Event emitted when fullscreen mode has been exited.\n *\n * @platform iOS, Android\n */\n onFullscreenExit?: (event: FullscreenExitEvent) => void;\n /**\n * Emitted when metadata is encountered during playback.\n */\n onMetadata?: (event: MetadataEvent) => void;\n /**\n * Emitted when metadata is first seen and parsed.\n */\n onMetadataParsed?: (event: MetadataParsedEvent) => void;\n /**\n * Event emitted when the player has been muted.\n */\n onMuted?: (event: MutedEvent) => void;\n /**\n * Event emitted when the player has been paused.\n */\n onPaused?: (event: PausedEvent) => void;\n /**\n * Event mitted when the availability of the Picture in Picture mode changed.\n */\n onPictureInPictureAvailabilityChanged?: (\n event: PictureInPictureAvailabilityChangedEvent\n ) => void;\n /**\n * Event emitted when the player enters Picture in Picture mode.\n */\n onPictureInPictureEnter?: (event: PictureInPictureEnterEvent) => void;\n /**\n * Event emitted when the player entered Picture in Picture mode.\n *\n * @platform iOS\n */\n onPictureInPictureEntered?: (event: PictureInPictureEnteredEvent) => void;\n /**\n * Event emitted when the player exits Picture in Picture mode.\n */\n onPictureInPictureExit?: (event: PictureInPictureExitEvent) => void;\n /**\n * Event emitted when the player exited Picture in Picture mode.\n *\n * @platform iOS\n */\n onPictureInPictureExited?: (event: PictureInPictureExitedEvent) => void;\n /**\n * Event emitted when the player received an intention to start/resume playback.\n */\n onPlay?: (event: PlayEvent) => void;\n /**\n * Event emitted when the playback of the current media has finished.\n */\n onPlaybackFinished?: (event: PlaybackFinishedEvent) => void;\n /**\n * Emitted when the player transitions from one playback speed to another.\n * @platform iOS, tvOS\n */\n onPlaybackSpeedChanged?: (event: PlaybackSpeedChangedEvent) => void;\n /**\n * Event emitted when a source is loaded into the player.\n * Seeking and time shifting are allowed as soon as this event is seen.\n */\n onPlayerActive?: (event: PlayerActiveEvent) => void;\n /**\n * Event Emitted when a player error occurred.\n */\n onPlayerError?: (event: PlayerErrorEvent) => void;\n /**\n * Event emitted when a player warning occurred.\n */\n onPlayerWarning?: (event: PlayerWarningEvent) => void;\n /**\n * Emitted when playback has started.\n */\n onPlaying?: (event: PlayingEvent) => void;\n /**\n * Emitted when the player is ready for immediate playback, because initial audio/video\n * has been downloaded.\n */\n onReady?: (event: ReadyEvent) => void;\n /**\n * Event emitted when the player is about to seek to a new position.\n * Only applies to VoD streams.\n */\n onSeek?: (event: SeekEvent) => void;\n /**\n * Event emitted when seeking has finished and data to continue playback is available.\n * Only applies to VoD streams.\n */\n onSeeked?: (event: SeekedEvent) => void;\n /**\n * Event mitted when the player starts time shifting.\n * Only applies to live streams.\n */\n onTimeShift?: (event: TimeShiftEvent) => void;\n /**\n * Event emitted when time shifting has finished and data is available to continue playback.\n * Only applies to live streams.\n */\n onTimeShifted?: (event: TimeShiftedEvent) => void;\n /**\n * Event emitted when the player begins to stall and to buffer due to an empty buffer.\n */\n onStallStarted?: (event: StallStartedEvent) => void;\n /**\n * Event emitted when the player ends stalling, due to enough data in the buffer.\n */\n onStallEnded?: (event: StallEndedEvent) => void;\n /**\n * Event emitted when a source error occurred.\n */\n onSourceError?: (event: SourceErrorEvent) => void;\n /**\n * Event emitted when a new source loading has started.\n */\n onSourceLoad?: (event: SourceLoadEvent) => void;\n /**\n * Event emitted when a new source is loaded.\n * This does not mean that the source is immediately ready for playback.\n * `ReadyEvent` indicates the player is ready for immediate playback.\n */\n onSourceLoaded?: (event: SourceLoadedEvent) => void;\n /**\n * Event emitted when the current source has been unloaded.\n */\n onSourceUnloaded?: (event: SourceUnloadedEvent) => void;\n /**\n * Event emitted when a source warning occurred.\n */\n onSourceWarning?: (event: SourceWarningEvent) => void;\n /**\n * Event emitted when a new audio track is added to the player.\n */\n onAudioAdded?: (event: AudioAddedEvent) => void;\n /**\n * Event emitted when the player's selected audio track has changed.\n */\n onAudioChanged?: (event: AudioChangedEvent) => void;\n /**\n * Event emitted when an audio track is removed from the player.\n */\n onAudioRemoved?: (event: AudioRemovedEvent) => void;\n /**\n * Event emitted when a new subtitle track is added to the player.\n */\n onSubtitleAdded?: (event: SubtitleAddedEvent) => void;\n /**\n * Event emitted when the player's selected subtitle track has changed.\n */\n onSubtitleChanged?: (event: SubtitleChangedEvent) => void;\n /**\n * Event emitted when a subtitle track is removed from the player.\n */\n onSubtitleRemoved?: (event: SubtitleRemovedEvent) => void;\n /**\n * Event emitted when the current playback time has changed.\n */\n onTimeChanged?: (event: TimeChangedEvent) => void;\n /**\n * Emitted when the player is unmuted.\n */\n onUnmuted?: (event: UnmutedEvent) => void;\n /**\n * Emitted when current video download quality has changed.\n */\n onVideoDownloadQualityChanged?: (\n event: VideoDownloadQualityChangedEvent\n ) => void;\n /**\n * Emitted when the current video playback quality has changed.\n */\n onVideoPlaybackQualityChanged?: (\n event: VideoPlaybackQualityChangedEvent\n ) => void;\n};\n"]}
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/components/PlayerView/events.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AdBreakFinishedEvent,\n AdBreakStartedEvent,\n AdClickedEvent,\n AdErrorEvent,\n AdFinishedEvent,\n AdManifestLoadedEvent,\n AdManifestLoadEvent,\n AdQuartileEvent,\n AdScheduledEvent,\n AdSkippedEvent,\n AdStartedEvent,\n CastAvailableEvent,\n CastPausedEvent,\n CastPlaybackFinishedEvent,\n CastPlayingEvent,\n CastStartedEvent,\n CastStartEvent,\n CastStoppedEvent,\n CastTimeUpdatedEvent,\n CastWaitingForDeviceEvent,\n DestroyEvent,\n Event,\n FullscreenEnabledEvent,\n FullscreenDisabledEvent,\n FullscreenEnterEvent,\n FullscreenExitEvent,\n MutedEvent,\n PausedEvent,\n PictureInPictureAvailabilityChangedEvent,\n PictureInPictureEnterEvent,\n PictureInPictureEnteredEvent,\n PictureInPictureExitEvent,\n PictureInPictureExitedEvent,\n PlaybackFinishedEvent,\n PlayerActiveEvent,\n PlayerErrorEvent,\n PlayerWarningEvent,\n PlayEvent,\n PlayingEvent,\n ReadyEvent,\n SeekedEvent,\n SeekEvent,\n TimeShiftEvent,\n TimeShiftedEvent,\n StallStartedEvent,\n StallEndedEvent,\n SourceErrorEvent,\n SourceLoadedEvent,\n SourceLoadEvent,\n SourceUnloadedEvent,\n SourceWarningEvent,\n AudioAddedEvent,\n AudioChangedEvent,\n AudioRemovedEvent,\n SubtitleAddedEvent,\n SubtitleChangedEvent,\n SubtitleRemovedEvent,\n TimeChangedEvent,\n UnmutedEvent,\n VideoPlaybackQualityChangedEvent,\n DownloadFinishedEvent,\n VideoDownloadQualityChangedEvent,\n PlaybackSpeedChangedEvent,\n CueEnterEvent,\n CueExitEvent,\n MetadataParsedEvent,\n MetadataEvent,\n FairplayLicenseAcquiredEvent,\n} from '../../events';\n\n/**\n * Event props for `PlayerView`.\n *\n * Note the events of `PlayerView` are simply a proxy over\n * the events from `NativePlayerView` just removing RN's bubbling data.\n */\nexport type PlayerViewEvents = {\n /**\n * Event emitted when an ad break has finished.\n */\n onAdBreakFinished?: (event: AdBreakFinishedEvent) => void;\n /**\n * Event emitted when an ad break has started.\n */\n onAdBreakStarted?: (event: AdBreakStartedEvent) => void;\n /**\n * Event emitted when an ad has been clicked.\n */\n onAdClicked?: (event: AdClickedEvent) => void;\n /**\n * Event emitted when an ad error has occurred.\n */\n onAdError?: (event: AdErrorEvent) => void;\n /**\n * Event emitted when an ad has finished.\n */\n onAdFinished?: (event: AdFinishedEvent) => void;\n /**\n * Event emitted when an ad manifest starts loading.\n */\n onAdManifestLoad?: (event: AdManifestLoadEvent) => void;\n /**\n * Event emitted when an ad manifest has been loaded.\n */\n onAdManifestLoaded?: (event: AdManifestLoadedEvent) => void;\n /**\n * Event emitted when an ad quartile has been reached.\n */\n onAdQuartile?: (event: AdQuartileEvent) => void;\n /**\n * Event emitted when an ad has been scheduled.\n */\n onAdScheduled?: (event: AdScheduledEvent) => void;\n /**\n * Event emitted when an ad has been skipped.\n */\n onAdSkipped?: (event: AdSkippedEvent) => void;\n /**\n * Event emitted when an ad has started.\n */\n onAdStarted?: (event: AdStartedEvent) => void;\n /**\n * Event emitted when casting to a cast-compatible device is available.\n *\n * @platform iOS, Android\n */\n onCastAvailable?: (event: CastAvailableEvent) => void;\n /**\n * Event emitted when the playback on a cast-compatible device was paused.\n *\n * @platform iOS, Android\n */\n onCastPaused?: (event: CastPausedEvent) => void;\n /**\n * Event emitted when the playback on a cast-compatible device has finished.\n *\n * @platform iOS, Android\n */\n onCastPlaybackFinished?: (event: CastPlaybackFinishedEvent) => void;\n /**\n * Event emitted when playback on a cast-compatible device has started.\n *\n * @platform iOS, Android\n */\n onCastPlaying?: (event: CastPlayingEvent) => void;\n /**\n * Event emitted when the cast app is launched successfully.\n *\n * @platform iOS, Android\n */\n onCastStarted?: (event: CastStartedEvent) => void;\n /**\n * Event emitted when casting is initiated, but the user still needs to choose which device should be used.\n *\n * @platform iOS, Android\n */\n onCastStart?: (event: CastStartEvent) => void;\n /**\n * Event emitted when casting to a cast-compatible device is stopped.\n *\n * @platform iOS, Android\n */\n onCastStopped?: (event: CastStoppedEvent) => void;\n /**\n * Event emitted when the time update from the currently used cast-compatible device is received.\n *\n * @platform iOS, Android\n */\n onCastTimeUpdated?: (event: CastTimeUpdatedEvent) => void;\n /**\n * Event emitted when a cast-compatible device has been chosen and the player is waiting for the device to get ready for\n * playback.\n *\n * @platform iOS, Android\n */\n onCastWaitingForDevice?: (event: CastWaitingForDeviceEvent) => void;\n /**\n * Event emitted when a subtitle entry transitions into the active status.\n */\n onCueEnter?: (event: CueEnterEvent) => void;\n /**\n * Event emitted when an active subtitle entry transitions into the inactive status.\n */\n onCueExit?: (event: CueExitEvent) => void;\n /**\n * Event emitted when the player is destroyed.\n */\n onDestroy?: (event: DestroyEvent) => void;\n /**\n * Emitted when a download was finished.\n */\n onDownloadFinished?: (event: DownloadFinishedEvent) => void;\n /**\n * All events emitted by the player.\n */\n onEvent?: (event: Event) => void;\n /**\n * Event emitted when fullscreen mode has been enabled.\n *\n * @platform iOS, Android\n */\n onFullscreenEnabled?: (event: FullscreenEnabledEvent) => void;\n /**\n * Event emitted when fullscreen mode has been disabled.\n *\n * @platform iOS, Android\n */\n onFullscreenDisabled?: (event: FullscreenDisabledEvent) => void;\n /**\n * Event emitted when fullscreen mode has been entered.\n *\n * @platform iOS, Android\n */\n onFullscreenEnter?: (event: FullscreenEnterEvent) => void;\n /**\n * Event emitted when fullscreen mode has been exited.\n *\n * @platform iOS, Android\n */\n onFullscreenExit?: (event: FullscreenExitEvent) => void;\n /**\n * Emitted when metadata is encountered during playback.\n */\n onMetadata?: (event: MetadataEvent) => void;\n /**\n * Emitted when metadata is first seen and parsed.\n */\n onMetadataParsed?: (event: MetadataParsedEvent) => void;\n /**\n * Event emitted when the player has been muted.\n */\n onMuted?: (event: MutedEvent) => void;\n /**\n * Event emitted when the player has been paused.\n */\n onPaused?: (event: PausedEvent) => void;\n /**\n * Event mitted when the availability of the Picture in Picture mode changed.\n */\n onPictureInPictureAvailabilityChanged?: (\n event: PictureInPictureAvailabilityChangedEvent\n ) => void;\n /**\n * Event emitted when the player enters Picture in Picture mode.\n */\n onPictureInPictureEnter?: (event: PictureInPictureEnterEvent) => void;\n /**\n * Event emitted when the player entered Picture in Picture mode.\n *\n * @platform iOS\n */\n onPictureInPictureEntered?: (event: PictureInPictureEnteredEvent) => void;\n /**\n * Event emitted when the player exits Picture in Picture mode.\n */\n onPictureInPictureExit?: (event: PictureInPictureExitEvent) => void;\n /**\n * Event emitted when the player exited Picture in Picture mode.\n *\n * @platform iOS\n */\n onPictureInPictureExited?: (event: PictureInPictureExitedEvent) => void;\n /**\n * Event emitted when the player received an intention to start/resume playback.\n */\n onPlay?: (event: PlayEvent) => void;\n /**\n * Event emitted when the playback of the current media has finished.\n */\n onPlaybackFinished?: (event: PlaybackFinishedEvent) => void;\n /**\n * Emitted when the player transitions from one playback speed to another.\n * @platform iOS, tvOS\n */\n onPlaybackSpeedChanged?: (event: PlaybackSpeedChangedEvent) => void;\n /**\n * Event emitted when a source is loaded into the player.\n * Seeking and time shifting are allowed as soon as this event is seen.\n */\n onPlayerActive?: (event: PlayerActiveEvent) => void;\n /**\n * Event Emitted when a player error occurred.\n */\n onPlayerError?: (event: PlayerErrorEvent) => void;\n /**\n * Event emitted when a player warning occurred.\n */\n onPlayerWarning?: (event: PlayerWarningEvent) => void;\n /**\n * Emitted when playback has started.\n */\n onPlaying?: (event: PlayingEvent) => void;\n /**\n * Emitted when the player is ready for immediate playback, because initial audio/video\n * has been downloaded.\n */\n onReady?: (event: ReadyEvent) => void;\n /**\n * Event emitted when the player is about to seek to a new position.\n * Only applies to VoD streams.\n */\n onSeek?: (event: SeekEvent) => void;\n /**\n * Event emitted when seeking has finished and data to continue playback is available.\n * Only applies to VoD streams.\n */\n onSeeked?: (event: SeekedEvent) => void;\n /**\n * Event mitted when the player starts time shifting.\n * Only applies to live streams.\n */\n onTimeShift?: (event: TimeShiftEvent) => void;\n /**\n * Event emitted when time shifting has finished and data is available to continue playback.\n * Only applies to live streams.\n */\n onTimeShifted?: (event: TimeShiftedEvent) => void;\n /**\n * Event emitted when the player begins to stall and to buffer due to an empty buffer.\n */\n onStallStarted?: (event: StallStartedEvent) => void;\n /**\n * Event emitted when the player ends stalling, due to enough data in the buffer.\n */\n onStallEnded?: (event: StallEndedEvent) => void;\n /**\n * Event emitted when a source error occurred.\n */\n onSourceError?: (event: SourceErrorEvent) => void;\n /**\n * Event emitted when a new source loading has started.\n */\n onSourceLoad?: (event: SourceLoadEvent) => void;\n /**\n * Event emitted when a new source is loaded.\n * This does not mean that the source is immediately ready for playback.\n * `ReadyEvent` indicates the player is ready for immediate playback.\n */\n onSourceLoaded?: (event: SourceLoadedEvent) => void;\n /**\n * Event emitted when the current source has been unloaded.\n */\n onSourceUnloaded?: (event: SourceUnloadedEvent) => void;\n /**\n * Event emitted when a source warning occurred.\n */\n onSourceWarning?: (event: SourceWarningEvent) => void;\n /**\n * Event emitted when a new audio track is added to the player.\n */\n onAudioAdded?: (event: AudioAddedEvent) => void;\n /**\n * Event emitted when the player's selected audio track has changed.\n */\n onAudioChanged?: (event: AudioChangedEvent) => void;\n /**\n * Event emitted when an audio track is removed from the player.\n */\n onAudioRemoved?: (event: AudioRemovedEvent) => void;\n /**\n * Event emitted when a new subtitle track is added to the player.\n */\n onSubtitleAdded?: (event: SubtitleAddedEvent) => void;\n /**\n * Event emitted when the player's selected subtitle track has changed.\n */\n onSubtitleChanged?: (event: SubtitleChangedEvent) => void;\n /**\n * Event emitted when a subtitle track is removed from the player.\n */\n onSubtitleRemoved?: (event: SubtitleRemovedEvent) => void;\n /**\n * Event emitted when the current playback time has changed.\n */\n onTimeChanged?: (event: TimeChangedEvent) => void;\n /**\n * Emitted when the player is unmuted.\n */\n onUnmuted?: (event: UnmutedEvent) => void;\n /**\n * Emitted when current video download quality has changed.\n */\n onVideoDownloadQualityChanged?: (\n event: VideoDownloadQualityChangedEvent\n ) => void;\n /**\n * Emitted when the current video playback quality has changed.\n */\n onVideoPlaybackQualityChanged?: (\n event: VideoPlaybackQualityChangedEvent\n ) => void;\n /**\n * Emitted when a FairPlay license has been acquired successfully.\n *\n * @platform iOS, tvOS\n */\n onFairplayLicenseAcquired?: (event: FairplayLicenseAcquiredEvent) => void;\n};\n"]}
@@ -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,GAAG,KAAK,EACT,EAAE,eAAe,4BA4KjB"}
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,GAAG,KAAK,EACT,EAAE,eAAe,4BA6KjB"}
@@ -52,7 +52,7 @@ export function PlayerView({ viewRef, style, player, config, fullscreenHandler,
52
52
  };
53
53
  const [isPlayerInitialized, setIsPlayerInitialized] = useState(false);
54
54
  useEffect(() => {
55
- player.initialize().then(() => {
55
+ void player.initialize().then(() => {
56
56
  setIsPlayerInitialized(true);
57
57
  // call attach player on native view if switched to AsyncFunction for RNPlayerViewExpo
58
58
  });
@@ -70,7 +70,7 @@ export function PlayerView({ viewRef, style, player, config, fullscreenHandler,
70
70
  }, [isPlayerInitialized, viewRef, nativeView]);
71
71
  useEffect(() => {
72
72
  if (isPlayerInitialized && pictureInPictureActions != null) {
73
- nativeView.current?.updatePictureInPictureActions(pictureInPictureActions);
73
+ void nativeView.current?.updatePictureInPictureActions(pictureInPictureActions);
74
74
  }
75
75
  }, [isPlayerInitialized, pictureInPictureActions]);
76
76
  if (!isPlayerInitialized) {
@@ -80,6 +80,6 @@ export function PlayerView({ viewRef, style, player, config, fullscreenHandler,
80
80
  ? (e) => props.onMetadata?.(addPlatformToMetadataEvent(e.nativeEvent))
81
81
  : undefined} onBmpMetadataParsed={props.onMetadataParsed
82
82
  ? (e) => props.onMetadataParsed?.(addPlatformToMetadataEvent(e.nativeEvent))
83
- : undefined} onBmpDestroy={proxy(props.onDestroy)} onBmpEvent={proxy(props.onEvent)} onBmpFullscreenEnabled={proxy(props.onFullscreenEnabled)} onBmpFullscreenDisabled={proxy(props.onFullscreenDisabled)} onBmpFullscreenEnter={proxy(props.onFullscreenEnter)} onBmpFullscreenExit={proxy(props.onFullscreenExit)} onBmpMuted={proxy(props.onMuted)} onBmpPaused={proxy(props.onPaused)} onBmpPictureInPictureAvailabilityChanged={proxy(props.onPictureInPictureAvailabilityChanged)} onBmpPictureInPictureEnter={proxy(props.onPictureInPictureEnter)} onBmpPictureInPictureEntered={proxy(props.onPictureInPictureEntered)} onBmpPictureInPictureExit={proxy(props.onPictureInPictureExit)} onBmpPictureInPictureExited={proxy(props.onPictureInPictureExited)} onBmpPlay={proxy(props.onPlay)} onBmpPlaybackFinished={proxy(props.onPlaybackFinished)} onBmpPlaybackSpeedChanged={proxy(props.onPlaybackSpeedChanged)} onBmpPlayerActive={proxy(props.onPlayerActive)} onBmpPlayerError={proxy(props.onPlayerError)} onBmpPlayerWarning={proxy(props.onPlayerWarning)} onBmpPlaying={proxy(props.onPlaying)} onBmpReady={proxy(props.onReady)} onBmpSeek={proxy(props.onSeek)} onBmpSeeked={proxy(props.onSeeked)} onBmpTimeShift={proxy(props.onTimeShift)} onBmpTimeShifted={proxy(props.onTimeShifted)} onBmpStallStarted={proxy(props.onStallStarted)} onBmpStallEnded={proxy(props.onStallEnded)} onBmpSourceError={proxy(props.onSourceError)} onBmpSourceLoad={proxy(props.onSourceLoad)} onBmpSourceLoaded={proxy(props.onSourceLoaded)} onBmpSourceUnloaded={proxy(props.onSourceUnloaded)} onBmpSourceWarning={proxy(props.onSourceWarning)} onBmpAudioAdded={proxy(props.onAudioAdded)} onBmpAudioChanged={proxy(props.onAudioChanged)} onBmpAudioRemoved={proxy(props.onAudioRemoved)} onBmpSubtitleAdded={proxy(props.onSubtitleAdded)} onBmpSubtitleChanged={proxy(props.onSubtitleChanged)} onBmpSubtitleRemoved={proxy(props.onSubtitleRemoved)} onBmpTimeChanged={proxy(props.onTimeChanged)} onBmpUnmuted={proxy(props.onUnmuted)} onBmpVideoDownloadQualityChanged={proxy(props.onVideoDownloadQualityChanged)} onBmpVideoPlaybackQualityChanged={proxy(props.onVideoPlaybackQualityChanged)} onBmpDownloadFinished={proxy(props.onDownloadFinished)}/>);
83
+ : undefined} onBmpDestroy={proxy(props.onDestroy)} onBmpEvent={proxy(props.onEvent)} onBmpFullscreenEnabled={proxy(props.onFullscreenEnabled)} onBmpFullscreenDisabled={proxy(props.onFullscreenDisabled)} onBmpFullscreenEnter={proxy(props.onFullscreenEnter)} onBmpFullscreenExit={proxy(props.onFullscreenExit)} onBmpMuted={proxy(props.onMuted)} onBmpPaused={proxy(props.onPaused)} onBmpPictureInPictureAvailabilityChanged={proxy(props.onPictureInPictureAvailabilityChanged)} onBmpPictureInPictureEnter={proxy(props.onPictureInPictureEnter)} onBmpPictureInPictureEntered={proxy(props.onPictureInPictureEntered)} onBmpPictureInPictureExit={proxy(props.onPictureInPictureExit)} onBmpPictureInPictureExited={proxy(props.onPictureInPictureExited)} onBmpPlay={proxy(props.onPlay)} onBmpPlaybackFinished={proxy(props.onPlaybackFinished)} onBmpPlaybackSpeedChanged={proxy(props.onPlaybackSpeedChanged)} onBmpPlayerActive={proxy(props.onPlayerActive)} onBmpPlayerError={proxy(props.onPlayerError)} onBmpPlayerWarning={proxy(props.onPlayerWarning)} onBmpPlaying={proxy(props.onPlaying)} onBmpReady={proxy(props.onReady)} onBmpSeek={proxy(props.onSeek)} onBmpSeeked={proxy(props.onSeeked)} onBmpTimeShift={proxy(props.onTimeShift)} onBmpTimeShifted={proxy(props.onTimeShifted)} onBmpStallStarted={proxy(props.onStallStarted)} onBmpStallEnded={proxy(props.onStallEnded)} onBmpSourceError={proxy(props.onSourceError)} onBmpSourceLoad={proxy(props.onSourceLoad)} onBmpSourceLoaded={proxy(props.onSourceLoaded)} onBmpSourceUnloaded={proxy(props.onSourceUnloaded)} onBmpSourceWarning={proxy(props.onSourceWarning)} onBmpAudioAdded={proxy(props.onAudioAdded)} onBmpAudioChanged={proxy(props.onAudioChanged)} onBmpAudioRemoved={proxy(props.onAudioRemoved)} onBmpSubtitleAdded={proxy(props.onSubtitleAdded)} onBmpSubtitleChanged={proxy(props.onSubtitleChanged)} onBmpSubtitleRemoved={proxy(props.onSubtitleRemoved)} onBmpTimeChanged={proxy(props.onTimeChanged)} onBmpUnmuted={proxy(props.onUnmuted)} onBmpVideoDownloadQualityChanged={proxy(props.onVideoDownloadQualityChanged)} onBmpVideoPlaybackQualityChanged={proxy(props.onVideoPlaybackQualityChanged)} onBmpDownloadFinished={proxy(props.onDownloadFinished)} onBmpFairplayLicenseAcquired={proxy(props.onFairplayLicenseAcquired)}/>);
84
84
  }
85
85
  //# sourceMappingURL=index.js.map
@@ -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,oBAAoB,EACpB,qBAAqB,GAAG,KAAK,EAC7B,WAAW,EACX,2BAA2B,GAAG,KAAK,EACnC,uBAAuB,EACvB,GAAG,KAAK,EACQ;IAChB,wDAAwD;IACxD,YAAY,EAAE,CAAC;IAEf,MAAM,UAAU,GAAG,MAAM,CAAwB,OAAO,EAAE,OAA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K,CACrC,KAAK,CAAC,6BAA6B,CACpC,CAAC,CACF,qBAAqB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,EACvD,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 ...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 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 nativeView.current?.updatePictureInPictureActions(\n pictureInPictureActions\n );\n }\n }, [isPlayerInitialized, pictureInPictureActions]);\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 />\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"]}
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,oBAAoB,EACpB,qBAAqB,GAAG,KAAK,EAC7B,WAAW,EACX,2BAA2B,GAAG,KAAK,EACnC,uBAAuB,EACvB,GAAG,KAAK,EACQ;IAChB,wDAAwD;IACxD,YAAY,EAAE,CAAC;IAEf,MAAM,UAAU,GAAG,MAAM,CAAwB,OAAO,EAAE,OAAO,IAAI,IAAI,CAAC,CAAC;IAE3E,8BAA8B;IAC9B,MAAM,KAAK,GAAG,QAAQ,EA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AAK,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 ...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 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"]}
@@ -1,4 +1,4 @@
1
- import { AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdErrorEvent, AdFinishedEvent, AdManifestLoadedEvent, AdManifestLoadEvent, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdStartedEvent, CastAvailableEvent, CastPausedEvent, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartedEvent, CastStartEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, DestroyEvent, Event, FullscreenEnabledEvent, FullscreenDisabledEvent, FullscreenEnterEvent, FullscreenExitEvent, MutedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlaybackFinishedEvent, PlayerActiveEvent, PlayerErrorEvent, PlayerWarningEvent, PlayEvent, PlayingEvent, ReadyEvent, SeekedEvent, SeekEvent, TimeShiftEvent, TimeShiftedEvent, StallStartedEvent, StallEndedEvent, SourceErrorEvent, SourceLoadedEvent, SourceLoadEvent, SourceUnloadedEvent, SourceWarningEvent, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleRemovedEvent, TimeChangedEvent, UnmutedEvent, VideoPlaybackQualityChangedEvent, DownloadFinishedEvent, VideoDownloadQualityChangedEvent, PlaybackSpeedChangedEvent, CueEnterEvent, CueExitEvent, MetadataEvent, MetadataParsedEvent } from '../../events';
1
+ import { AdBreakFinishedEvent, AdBreakStartedEvent, AdClickedEvent, AdErrorEvent, AdFinishedEvent, AdManifestLoadedEvent, AdManifestLoadEvent, AdQuartileEvent, AdScheduledEvent, AdSkippedEvent, AdStartedEvent, CastAvailableEvent, CastPausedEvent, CastPlaybackFinishedEvent, CastPlayingEvent, CastStartedEvent, CastStartEvent, CastStoppedEvent, CastTimeUpdatedEvent, CastWaitingForDeviceEvent, DestroyEvent, Event, FullscreenEnabledEvent, FullscreenDisabledEvent, FullscreenEnterEvent, FullscreenExitEvent, MutedEvent, PausedEvent, PictureInPictureAvailabilityChangedEvent, PictureInPictureEnterEvent, PictureInPictureEnteredEvent, PictureInPictureExitEvent, PictureInPictureExitedEvent, PlaybackFinishedEvent, PlayerActiveEvent, PlayerErrorEvent, PlayerWarningEvent, PlayEvent, PlayingEvent, ReadyEvent, SeekedEvent, SeekEvent, TimeShiftEvent, TimeShiftedEvent, StallStartedEvent, StallEndedEvent, SourceErrorEvent, SourceLoadedEvent, SourceLoadEvent, SourceUnloadedEvent, SourceWarningEvent, AudioAddedEvent, AudioChangedEvent, AudioRemovedEvent, SubtitleAddedEvent, SubtitleChangedEvent, SubtitleRemovedEvent, TimeChangedEvent, UnmutedEvent, VideoPlaybackQualityChangedEvent, DownloadFinishedEvent, VideoDownloadQualityChangedEvent, PlaybackSpeedChangedEvent, CueEnterEvent, CueExitEvent, MetadataEvent, MetadataParsedEvent, FairplayLicenseAcquiredEvent } from '../../events';
2
2
  /**
3
3
  * Event props for `NativePlayerView`.
4
4
  */
@@ -449,5 +449,13 @@ export type NativePlayerViewEvents = {
449
449
  onBmpVideoPlaybackQualityChanged?: (event: {
450
450
  nativeEvent: VideoPlaybackQualityChangedEvent;
451
451
  }) => void;
452
+ /**
453
+ * Event emitted when a FairPlay license has been acquired successfully.
454
+ *
455
+ * @platform iOS, tvOS
456
+ */
457
+ onBmpFairplayLicenseAcquired?: (event: {
458
+ nativeEvent: FairplayLicenseAcquiredEvent;
459
+ }) => void;
452
460
  };
453
461
  //# sourceMappingURL=nativeEvents.d.ts.map