react-native-theoplayer 8.0.3 → 8.2.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 (48) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/android/build.gradle +3 -3
  3. package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/8.0.0/ads-wrapper-8.0.0.pom +15 -0
  4. package/android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt +16 -1
  5. package/android/src/main/java/com/theoplayer/ReactTHEOplayerPackage.kt +3 -1
  6. package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +2 -1
  7. package/android/src/main/java/com/theoplayer/playback/PlaybackSettingsModule.kt +28 -0
  8. package/ios/ads/THEOplayerRCTView+Ads.swift +4 -0
  9. package/ios/ads/THEOplayerRCTView+AdsConfig.swift +8 -0
  10. package/ios/presentationMode/THEOplayerRCTPresentationModeManager.swift +51 -11
  11. package/lib/commonjs/api/playback/PlaybackSettingsAPI.js +2 -0
  12. package/lib/commonjs/api/playback/PlaybackSettingsAPI.js.map +1 -0
  13. package/lib/commonjs/api/playback/barrel.js +17 -0
  14. package/lib/commonjs/api/playback/barrel.js.map +1 -0
  15. package/lib/commonjs/index.js +9 -1
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/commonjs/internal/THEOplayerView.web.js +1 -0
  18. package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
  19. package/lib/commonjs/internal/playback/PlaybackSettings.js +28 -0
  20. package/lib/commonjs/internal/playback/PlaybackSettings.js.map +1 -0
  21. package/lib/module/api/playback/PlaybackSettingsAPI.js +2 -0
  22. package/lib/module/api/playback/PlaybackSettingsAPI.js.map +1 -0
  23. package/lib/module/api/playback/barrel.js +2 -0
  24. package/lib/module/api/playback/barrel.js.map +1 -0
  25. package/lib/module/index.js +1 -0
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/internal/THEOplayerView.web.js +1 -0
  28. package/lib/module/internal/THEOplayerView.web.js.map +1 -1
  29. package/lib/module/internal/playback/PlaybackSettings.js +21 -0
  30. package/lib/module/internal/playback/PlaybackSettings.js.map +1 -0
  31. package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts +8 -0
  32. package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts.map +1 -1
  33. package/lib/typescript/api/playback/PlaybackSettingsAPI.d.ts +38 -0
  34. package/lib/typescript/api/playback/PlaybackSettingsAPI.d.ts.map +1 -0
  35. package/lib/typescript/api/playback/barrel.d.ts +2 -0
  36. package/lib/typescript/api/playback/barrel.d.ts.map +1 -0
  37. package/lib/typescript/index.d.ts +1 -0
  38. package/lib/typescript/index.d.ts.map +1 -1
  39. package/lib/typescript/internal/THEOplayerView.web.d.ts.map +1 -1
  40. package/lib/typescript/internal/playback/PlaybackSettings.d.ts +7 -0
  41. package/lib/typescript/internal/playback/PlaybackSettings.d.ts.map +1 -0
  42. package/package.json +9 -3
  43. package/src/api/ads/GoogleImaConfiguration.ts +9 -0
  44. package/src/api/playback/PlaybackSettingsAPI.ts +39 -0
  45. package/src/api/playback/barrel.ts +1 -0
  46. package/src/index.tsx +1 -0
  47. package/src/internal/THEOplayerView.web.tsx +1 -0
  48. package/src/internal/playback/PlaybackSettings.ts +25 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [8.2.0] - 24-09-26
9
+
10
+ ### Added
11
+
12
+ - Added the `PlaybackSettings` API for Android, allowing control of playback behaviour across all THEOplayer instances.
13
+
14
+ ## [8.1.0] - 24-09-23
15
+
16
+ ### Added
17
+
18
+ - Added support for `bitrate` config on the GoogleIMAConfiguration, to be passed to the IMA SDK rendering settings.
19
+ - Added support on iOS and Android for `allowedMimeTypes` config on the AdsConfiguration, to be passed to the IMA SDK rendering settings.
20
+
21
+ ### Fixed
22
+
23
+ - Fixed an issue where cast events were not forwarded from the native Android SDK.
24
+ - Fixed an issue where presentationMode changes on iOS would cause a UIViewControllerHierarchyInconsistency when an ad is playing.
25
+ - Fixed an issue where some ad event types could not be resolved at runtime when excluding the IMA integration on Android.
26
+
8
27
  ## [8.0.3] - 24-09-14
9
28
 
10
29
  ### Fixed
@@ -114,9 +114,9 @@ dependencies {
114
114
  implementation "androidx.core:core-ktx:${safeExtGet('corektxVersion', '1.10.1')}"
115
115
  implementation "com.google.code.gson:gson:2.11.0"
116
116
 
117
- // The minimum supported THEOplayer version is 7.12.0
118
- def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.12.0, 9.0.0)')
119
- def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[7.12.0, 9.0.0)')
117
+ // The minimum supported THEOplayer version is 8.1.0
118
+ def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[8.1.0, 9.0.0)')
119
+ def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[8.1.0, 9.0.0)')
120
120
 
121
121
  println("Using THEOplayer (${versionString(theoplayer_sdk_version)})")
122
122
  implementation "com.theoplayer.theoplayer-sdk-android:core:${theoplayer_sdk_version}"
@@ -6,4 +6,19 @@
6
6
  <artifactId>ads-wrapper</artifactId>
7
7
  <version>8.0.0</version>
8
8
  <packaging>aar</packaging>
9
+ <dependencies>
10
+ <!-- Include transitive dependencies -->
11
+ <dependency>
12
+ <groupId>com.theoplayer.theoplayer-sdk-android</groupId>
13
+ <artifactId>integration-ads</artifactId>
14
+ <version>8.0.0</version>
15
+ <scope>runtime</scope>
16
+ </dependency>
17
+ <dependency>
18
+ <groupId>com.theoplayer.theoplayer-sdk-android</groupId>
19
+ <artifactId>integration-ads-ima</artifactId>
20
+ <version>8.0.0</version>
21
+ <scope>runtime</scope>
22
+ </dependency>
23
+ </dependencies>
9
24
  </project>
@@ -34,6 +34,8 @@ private const val PROP_FEATURE_FLAGS = "featureFlags"
34
34
  private const val PROP_AUTOPLAY_AD_BREAKS = "autoPlayAdBreaks"
35
35
  private const val PROP_SESSION_ID = "sessionID"
36
36
  private const val PROP_ENABLE_DEBUG_MODE = "enableDebugMode"
37
+ private const val PROP_BITRATE = "bitrate"
38
+ private const val PROP_ALLOWED_MIMETYPES = "allowedMimeTypes"
37
39
 
38
40
  class PlayerConfigAdapter(private val configProps: ReadableMap?) {
39
41
 
@@ -93,7 +95,7 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
93
95
  *
94
96
  * @see <a href="https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/ImaSdkSettings">IMA SDK for Android</a>.
95
97
  */
96
- fun imaSdkSettings(): ImaSdkSettings{
98
+ fun imaSdkSettings(): ImaSdkSettings {
97
99
  return ImaSdkFactory.getInstance().createImaSdkSettings().apply {
98
100
  configProps?.getMap(PROP_ADS_CONFIGURATION)?.getMap(PROP_IMA_CONFIGURATION)?.run {
99
101
  // Specifies whether VMAP and ad rules ad breaks are automatically played.
@@ -149,6 +151,19 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
149
151
  val preloadTypeString = getString(PROP_PRELOAD)
150
152
  enablePreloading = preloadTypeString !== "none"
151
153
  }
154
+ if (hasKey(PROP_ALLOWED_MIMETYPES)) {
155
+ mimeTypes = ArrayList<String>().apply {
156
+ getArray(PROP_ALLOWED_MIMETYPES)?.toArrayList()?.forEach {
157
+ add(it as String)
158
+ }
159
+ }
160
+ }
161
+ }
162
+ // bitrate is configured under the ima config
163
+ configProps?.getMap(PROP_ADS_CONFIGURATION)?.getMap(PROP_IMA_CONFIGURATION)?.run {
164
+ if (hasKey(PROP_BITRATE)) {
165
+ bitrateKbps = getInt(PROP_BITRATE)
166
+ }
152
167
  }
153
168
  }
154
169
  }
@@ -9,6 +9,7 @@ import com.theoplayer.cache.CacheModule
9
9
  import com.theoplayer.drm.ContentProtectionModule
10
10
  import com.theoplayer.cast.CastModule
11
11
  import com.theoplayer.broadcast.EventBroadcastModule
12
+ import com.theoplayer.playback.PlaybackSettingsModule
12
13
  import com.theoplayer.player.PlayerModule
13
14
 
14
15
  class ReactTHEOplayerPackage : ReactPackage {
@@ -19,7 +20,8 @@ class ReactTHEOplayerPackage : ReactPackage {
19
20
  ContentProtectionModule(reactContext),
20
21
  CastModule(reactContext),
21
22
  CacheModule(reactContext),
22
- EventBroadcastModule(reactContext)
23
+ EventBroadcastModule(reactContext),
24
+ PlaybackSettingsModule(reactContext)
23
25
  )
24
26
  }
25
27
 
@@ -52,7 +52,8 @@ class ReactTHEOplayerView(private val reactContext: ThemedReactContext) :
52
52
  playerContext = ReactTHEOplayerContext.create(
53
53
  reactContext,
54
54
  PlayerConfigAdapter(configProps)
55
- ).apply {
55
+ )
56
+ playerContext?.apply {
56
57
  adsApi.initialize(player, imaIntegration, daiIntegration)
57
58
  val layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
58
59
  playerView.layoutParams = layoutParams
@@ -0,0 +1,28 @@
1
+ package com.theoplayer.playback
2
+
3
+ import com.facebook.react.bridge.ReactApplicationContext
4
+ import com.facebook.react.bridge.ReactContextBaseJavaModule
5
+ import com.facebook.react.bridge.ReactMethod
6
+ import com.theoplayer.android.api.THEOplayerGlobal
7
+ import com.theoplayer.android.api.settings.PlaybackSettings
8
+
9
+ class PlaybackSettingsModule(private val context: ReactApplicationContext) :
10
+ ReactContextBaseJavaModule(context) {
11
+
12
+ private val playbackSettings: PlaybackSettings
13
+ get() = THEOplayerGlobal.getSharedInstance(context.applicationContext).playbackSettings
14
+
15
+ override fun getName(): String {
16
+ return "THEORCTPlaybackSettingsModule"
17
+ }
18
+
19
+ @ReactMethod
20
+ fun useFastStartup(useFastStartup: Boolean) {
21
+ playbackSettings.useFastStartup(useFastStartup)
22
+ }
23
+
24
+ @ReactMethod
25
+ fun setLipSyncCorrection(correctionMs: Double) {
26
+ playbackSettings.setLipSyncCorrection(correctionMs.toLong())
27
+ }
28
+ }
@@ -52,6 +52,10 @@ extension THEOplayerRCTView {
52
52
  imaRenderSettings.disableUi = disableUi
53
53
  imaRenderSettings.uiElements = []
54
54
  }
55
+ imaRenderSettings.bitrate = self.adsConfig.adsImaConfig.bitrate
56
+ if let allowedMimeTypes = self.adsConfig.allowedMimeTypes {
57
+ imaRenderSettings.mimeTypes = allowedMimeTypes
58
+ }
55
59
 
56
60
  // setup integration
57
61
  let imaIntegration = GoogleIMAIntegrationFactory.createIntegration(on: player, with: imaSettings)
@@ -3,9 +3,14 @@
3
3
  import Foundation
4
4
  import THEOplayerSDK
5
5
 
6
+ #if canImport(THEOplayerGoogleIMAIntegration)
7
+ import GoogleInteractiveMediaAds
8
+ #endif
9
+
6
10
  struct AdsConfig {
7
11
  var adSUIEnabled: Bool = true
8
12
  var adsImaConfig = AdsImaConfig()
13
+ var allowedMimeTypes: [String]?
9
14
  }
10
15
 
11
16
  struct AdsImaConfig {
@@ -15,6 +20,7 @@ struct AdsImaConfig {
15
20
  var featureFlags: [String:String]?
16
21
  var autoPlayAdBreaks: Bool?
17
22
  var sessionID: String?
23
+ var bitrate: Int = kIMAAutodetectBitrate
18
24
  }
19
25
 
20
26
  #if os(iOS)
@@ -24,6 +30,7 @@ extension THEOplayerRCTView {
24
30
  func parseAdsConfig(configDict: NSDictionary) {
25
31
  if let adsConfig = configDict["ads"] as? NSDictionary {
26
32
  self.adsConfig.adSUIEnabled = adsConfig["uiEnabled"] as? Bool ?? true
33
+ self.adsConfig.allowedMimeTypes = adsConfig["allowedMimeTypes"] as? [String]
27
34
  if let adsImaConfig = adsConfig["ima"] as? NSDictionary {
28
35
  if let ppid = adsImaConfig["ppid"] as? String {
29
36
  self.adsConfig.adsImaConfig.ppid = ppid
@@ -43,6 +50,7 @@ extension THEOplayerRCTView {
43
50
  if let enableDebugMode = adsImaConfig["enableDebugMode"] as? Bool {
44
51
  self.adsConfig.adsImaConfig.enableDebugMode = enableDebugMode
45
52
  }
53
+ self.adsConfig.adsImaConfig.bitrate = adsImaConfig["bitrate"] as? Int ?? kIMAAutodetectBitrate
46
54
  }
47
55
  }
48
56
  }
@@ -2,6 +2,7 @@
2
2
 
3
3
  import Foundation
4
4
  import THEOplayerSDK
5
+ import UIKit
5
6
 
6
7
  public class THEOplayerRCTPresentationModeManager {
7
8
  // MARK: Members
@@ -10,9 +11,9 @@ public class THEOplayerRCTPresentationModeManager {
10
11
  var presentationModeContext = THEOplayerRCTPresentationModeContext()
11
12
  var presentationMode: THEOplayerSDK.PresentationMode = .inline
12
13
 
13
- private var containerView: UIView? // view containing the playerView and it's siblings (e.g. UI)
14
- private var fullscreenParentView: UIView? // target view for fulllscreen representation
15
- private var inlineParentView: UIView? // target view for inline representation
14
+ private var containerView: UIView? // view containing the playerView and it's siblings (e.g. UI)
15
+ private var inlineParentView: UIView? // target view for inline representation
16
+ private var movingChildVCs: [UIViewController] = [] // list of playerView's child VCs that need to be reparented while moving the playerView
16
17
 
17
18
  // MARK: Events
18
19
  var onNativePresentationModeChange: RCTDirectEventBlock?
@@ -37,25 +38,54 @@ public class THEOplayerRCTPresentationModeManager {
37
38
 
38
39
  // MARK: - logic
39
40
 
41
+ private func storeMovingVCs(for view: UIView) {
42
+ if let viewController = view.findViewController() {
43
+ viewController.children.forEach { childVC in
44
+ self.movingChildVCs.append(childVC)
45
+ }
46
+ }
47
+ }
48
+
49
+ private func clearMovingVCs() {
50
+ self.movingChildVCs = []
51
+ }
52
+
53
+ private func moveView(_ movingView: UIView, to targetView: UIView, with movingViewControllers: [UIViewController]) {
54
+ // detach the moving viewControllers from their parent
55
+ movingViewControllers.forEach { movedVC in
56
+ movedVC.removeFromParent()
57
+ }
58
+
59
+ // move the actual view
60
+ movingView.removeFromSuperview()
61
+ targetView.addSubview(movingView)
62
+ targetView.bringSubviewToFront(movingView)
63
+
64
+ // attach the moving viewControllers to their new parent
65
+ if let targetViewController = targetView.findViewController() {
66
+ movingViewControllers.forEach { movedVC in
67
+ targetViewController.addChild(movedVC)
68
+ movedVC.didMove(toParent: targetViewController)
69
+ }
70
+ }
71
+ }
72
+
40
73
  private func enterFullscreen() {
41
74
  self.containerView = self.view?.findParentViewOfType(RCTView.self)
42
- self.fullscreenParentView = self.view?.findParentViewOfType(RCTRootContentView.self)
43
75
  self.inlineParentView = self.containerView?.findParentViewOfType(RCTView.self)
44
76
 
45
77
  if let containerView = self.containerView,
46
- let fullscreenParentView = self.fullscreenParentView {
47
- containerView.removeFromSuperview()
48
- fullscreenParentView.addSubview(containerView)
49
- fullscreenParentView.bringSubviewToFront(containerView)
78
+ let fullscreenParentView = self.view?.findParentViewOfType(RCTRootContentView.self) {
79
+ self.storeMovingVCs(for: containerView)
80
+ self.moveView(containerView, to: fullscreenParentView, with: self.movingChildVCs)
50
81
  }
51
82
  }
52
83
 
53
84
  private func exitFullscreen() {
54
85
  if let containerView = self.containerView,
55
86
  let inlineParentView = self.inlineParentView {
56
- containerView.removeFromSuperview()
57
- inlineParentView.addSubview(containerView)
58
- inlineParentView.bringSubviewToFront(containerView)
87
+ self.moveView(containerView, to: inlineParentView, with: self.movingChildVCs)
88
+ self.clearMovingVCs()
59
89
  }
60
90
  }
61
91
 
@@ -156,4 +186,14 @@ extension UIView {
156
186
  }
157
187
  return nil
158
188
  }
189
+
190
+ func findViewController() -> UIViewController? {
191
+ if let nextResponder = self.next as? UIViewController {
192
+ return nextResponder
193
+ } else if let nextResponder = self.next as? UIView {
194
+ return nextResponder.findViewController()
195
+ } else {
196
+ return nil
197
+ }
198
+ }
159
199
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=PlaybackSettingsAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/playback/PlaybackSettingsAPI.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _PlaybackSettingsAPI = require("./PlaybackSettingsAPI");
7
+ Object.keys(_PlaybackSettingsAPI).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _PlaybackSettingsAPI[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _PlaybackSettingsAPI[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=barrel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_PlaybackSettingsAPI","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sourceRoot":"../../../../src","sources":["api/playback/barrel.ts"],"mappings":";;;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,oBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,oBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,oBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  var _exportNames = {
7
7
  THEOplayerView: true,
8
8
  ContentProtectionRegistry: true,
9
- MediaCache: true
9
+ MediaCache: true,
10
+ PlaybackSettings: true
10
11
  };
11
12
  Object.defineProperty(exports, "ContentProtectionRegistry", {
12
13
  enumerable: true,
@@ -20,6 +21,12 @@ Object.defineProperty(exports, "MediaCache", {
20
21
  return _MediaCache.MediaCache;
21
22
  }
22
23
  });
24
+ Object.defineProperty(exports, "PlaybackSettings", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _PlaybackSettings.PlaybackSettings;
28
+ }
29
+ });
23
30
  Object.defineProperty(exports, "THEOplayerView", {
24
31
  enumerable: true,
25
32
  get: function () {
@@ -41,4 +48,5 @@ Object.keys(_barrel).forEach(function (key) {
41
48
  var _THEOplayerView = require("./internal/THEOplayerView");
42
49
  var _ContentProtectionRegistry = require("./internal/drm/ContentProtectionRegistry");
43
50
  var _MediaCache = require("./internal/cache/MediaCache");
51
+ var _PlaybackSettings = require("./internal/playback/PlaybackSettings");
44
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_barrel","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_THEOplayerView","_ContentProtectionRegistry","_MediaCache"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,eAAA,GAAAb,OAAA;AACA,IAAAc,0BAAA,GAAAd,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_barrel","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_THEOplayerView","_ContentProtectionRegistry","_MediaCache","_PlaybackSettings"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,eAAA,GAAAb,OAAA;AACA,IAAAc,0BAAA,GAAAd,OAAA;AACA,IAAAe,WAAA,GAAAf,OAAA;AACA,IAAAgB,iBAAA,GAAAhB,OAAA","ignoreList":[]}
@@ -24,6 +24,7 @@ function THEOplayerView(props) {
24
24
  const ads = {
25
25
  ...config?.ads,
26
26
  googleIma: {
27
+ ...config?.ads?.ima,
27
28
  useNativeIma: true,
28
29
  language: config?.ui?.language ?? 'en'
29
30
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_theoplayer","_THEOplayerWebAdapter","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","THEOplayerView","props","config","children","player","useRef","adapter","container","useEffect","current","chromeless","undefined","ads","googleIma","useNativeIma","language","ui","updatedConfig","allowNativeFullscreen","ChromelessPlayer","Player","fluid","THEOplayerWebAdapter","window","nativePlayer","onPlayerReady","onPlayerDestroy","destroy","createElement","Fragment","ref","style","styles","className","display","position","width","height","maxHeight","maxWidth","aspectRatio"],"sourceRoot":"../../../src","sources":["internal/THEOplayerView.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;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xC;;IAEA;IACA,OAAO,MAAM;MACX;MACA,MAAM;QAAEiB;MAAgB,CAAC,GAAGzB,KAAK;MACjC,IAAIK,OAAO,EAAEG,OAAO,IAAIiB,eAAe,EAAE;QACvCA,eAAe,CAACpB,OAAO,EAAEG,OAAO,CAAC;MACnC;MACAH,OAAO,EAAEG,OAAO,EAAEkB,OAAO,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACpB,SAAS,CAAC,CAAC;EAEf,MAAMG,UAAU,GAAGR,MAAM,EAAEQ,UAAU,KAAKC,SAAS,IAAIT,MAAM,EAAEQ,UAAU,KAAK,IAAI;EAClF,oBACEnC,MAAA,CAAAW,OAAA,CAAA0C,aAAA,CAAArD,MAAA,CAAAW,OAAA,CAAA2C,QAAA,qBACEtD,MAAA,CAAAW,OAAA,CAAA0C,aAAA;IACEE,GAAG,EAAEvB,SAAU;IACfwB,KAAK,EAAEC,MAAM,CAACzB,SAAU;IACxB0B,SAAS,EAAEvB,UAAU,GAAG,sBAAsB,GAAG;EAAgD,CAClG,CAAC,EACDP,QACD,CAAC;AAEP;AAEA,MAAM6B,MAAM,GAAG;EACb;EACA;EACAzB,SAAS,EAAE;IACT2B,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,SAAS,EAAE,OAAO;IAClBC,QAAQ,EAAE,OAAO;IACjBC,WAAW,EAAE;EACf;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_theoplayer","_THEOplayerWebAdapter","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","THEOplayerView","props","config","children","player","useRef","adapter","container","useEffect","current","chromeless","undefined","ads","googleIma","ima","useNativeIma","language","ui","updatedConfig","allowNativeFullscreen","ChromelessPlayer","Player","fluid","THEOplayerWebAdapter","window","nativePlayer","onPlayerReady","onPlayerDestroy","destroy","createElement","Fragment","ref","style","styles","className","display","position","width","height","maxHeight","maxWidth","aspectRatio"],"sourceRoot":"../../../src","sources":["internal/THEOplayerView.web.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAAsE,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAA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ule", {
4
+ value: true
5
+ });
6
+ exports.PlaybackSettings = exports.NativePlaybackSettings = void 0;
7
+ var _reactNative = require("react-native");
8
+ const NativePlaybackSettingsModule = _reactNative.NativeModules.THEORCTPlaybackSettingsModule;
9
+ const TAG = 'PlaybackSettings';
10
+ class NativePlaybackSettings {
11
+ useFastStartup(useFastStartup) {
12
+ if (_reactNative.Platform.OS !== 'android') {
13
+ console.warn(TAG, 'useFastStartup is only available on Android platforms.');
14
+ return;
15
+ }
16
+ NativePlaybackSettingsModule.useFastStartup(useFastStartup);
17
+ }
18
+ setLipSyncCorrection(correctionMs) {
19
+ if (_reactNative.Platform.OS !== 'android') {
20
+ console.warn(TAG, 'setLipSyncCorrect is only available on Android platforms.');
21
+ return;
22
+ }
23
+ NativePlaybackSettingsModule.setLipSyncCorrection(correctionMs);
24
+ }
25
+ }
26
+ exports.NativePlaybackSettings = NativePlaybackSettings;
27
+ const PlaybackSettings = exports.PlaybackSettings = new NativePlaybackSettings();
28
+ //# sourceMappingURL=PlaybackSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","NativePlaybackSettingsModule","NativeModules","THEORCTPlaybackSettingsModule","TAG","NativePlaybackSettings","useFastStartup","Platform","OS","console","warn","setLipSyncCorrection","correctionMs","exports","PlaybackSettings"],"sourceRoot":"../../../../src","sources":["internal/playback/PlaybackSettings.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,MAAMC,4BAA4B,GAAGC,0BAAa,CAACC,6BAA6B;AAEhF,MAAMC,GAAG,GAAG,kBAAkB;AAEvB,MAAMC,sBAAsB,CAAgC;EACjEC,cAAcA,CAACA,cAAuB,EAAQ;IAC5C,IAAIC,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACN,GAAG,EAAE,wDAAwD,CAAC;MAC3E;IACF;IACAH,4BAA4B,CAACK,cAAc,CAACA,cAAc,CAAC;EAC7D;EACAK,oBAAoBA,CAACC,YAAoB,EAAQ;IAC/C,IAAIL,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACN,GAAG,EAAE,2DAA2D,CAAC;MAC9E;IACF;IACAH,4BAA4B,CAACU,oBAAoB,CAACC,YAAY,CAAC;EACjE;AACF;AAACC,OAAA,CAAAR,sBAAA,GAAAA,sBAAA;AAEM,MAAMS,gBAAqC,GAAAD,OAAA,CAAAC,gBAAA,GAAG,IAAIT,sBAAsB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=PlaybackSettingsAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/playback/PlaybackSettingsAPI.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from './PlaybackSettingsAPI';
2
+ //# sourceMappingURL=barrel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["api/playback/barrel.ts"],"mappings":"AAAA,cAAc,uBAAuB","ignoreList":[]}
@@ -2,4 +2,5 @@ export * from './api/barrel';
2
2
  export { THEOplayerView } from './internal/THEOplayerView';
3
3
  export { ContentProtectionRegistry } from './internal/drm/ContentProtectionRegistry';
4
4
  export { MediaCache } from './internal/cache/MediaCache';
5
+ export { PlaybackSettings } from './internal/playback/PlaybackSettings';
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["THEOplayerView","ContentProtectionRegistry","MediaCache"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,cAAc,cAAc;AAC5B,SAASA,cAAc,QAAQ,2BAA2B;AAC1D,SAASC,yBAAyB,QAAQ,0CAA0C;AACpF,SAASC,UAAU,QAAQ,6BAA6B","ignoreList":[]}
1
+ {"version":3,"names":["THEOplayerView","ContentProtectionRegistry","MediaCache","PlaybackSettings"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,cAAc,cAAc;AAC5B,SAASA,cAAc,QAAQ,2BAA2B;AAC1D,SAASC,yBAAyB,QAAQ,0CAA0C;AACpF,SAASC,UAAU,QAAQ,6BAA6B;AACxD,SAASC,gBAAgB,QAAQ,sCAAsC","ignoreList":[]}
@@ -16,6 +16,7 @@ export function THEOplayerView(props) {
16
16
  const ads = {
17
17
  ...config?.ads,
18
18
  googleIma: {
19
+ ...config?.ads?.ima,
19
20
  useNativeIma: true,
20
21
  language: config?.ui?.language ?? 'en'
21
22
  }
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useRef","Player","ChromelessPlayer","THEOplayerWebAdapter","THEOplayerView","props","config","children","player","adapter","container","current","chromeless","undefined","ads","googleIma","useNativeIma","language","ui","updatedConfig","allowNativeFullscreen","fluid","window","nativePlayer","onPlayerReady","onPlayerDestroy","destroy","createElement","Fragment","ref","style","styles","className","display","position","width","height","maxHeight","maxWidth","aspectRatio"],"sourceRoot":"../../../src","sources":["internal/THEOplayerView.web.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEhD,SAASC,MAAM,EAAEC,gBAAgB,QAA6B,YAAY;AAC1E,SAASC,oBAAoB,QAAQ,gCAAgC;AAErE,OAAO,SAASC,cAAcA,CAACC,KAAmD,EAAE;EAClF,MAAM;IAAEC,MAAM;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAClC,MAAMG,MAAM,GAAGR,MAAM,CAA0B,IAAI,CAAC;EACpD,MAAMS,OAAO,GAAGT,MAAM,CAA8B,IAAI,CAAC;EACzD,MAAMU,SAAS,GAAGV,MAAM,CAAwB,IAAI,CAAC;EAErDD,SAAS,CAAC,MAAM;IACd;IACA,IAAIW,SAAS,CAACC,OAAO,EAAE;MACrB,MAAMC,UAAU,GAAGN,MAAM,EAAEM,UAAU,KAAK,IAAI,IAAIN,MAAM,EAAEM,UAAU,KAAKC,SAAS;MAClF,MAAMC,GAA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,KAAK,IAAI;EAClF,oBACEd,KAAA,CAAA6B,aAAA,CAAA7B,KAAA,CAAA8B,QAAA,qBACE9B,KAAA,CAAA6B,aAAA;IACEE,GAAG,EAAEnB,SAAU;IACfoB,KAAK,EAAEC,MAAM,CAACrB,SAAU;IACxBsB,SAAS,EAAEpB,UAAU,GAAG,sBAAsB,GAAG;EAAgD,CAClG,CAAC,EACDL,QACD,CAAC;AAEP;AAEA,MAAMwB,MAAM,GAAG;EACb;EACA;EACArB,SAAS,EAAE;IACTuB,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,SAAS,EAAE,OAAO;IAClBC,QAAQ,EAAE,OAAO;IACjBC,WAAW,EAAE;EACf;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useRef","Player","ChromelessPlayer","THEOplayerWebAdapter","THEOplayerView","props","config","children","player","adapter","container","current","chromeless","undefined","ads","googleIma","ima","useNativeIma","language","ui","updatedConfig","allowNativeFullscreen","fluid","window","nativePlayer","onPlayerReady","onPlayerDestroy","destroy","createElement","Fragment","ref","style","styles","className","display","position","width","height","maxHeight","maxWidth","aspectRatio"],"sourceRoot":"../../../src","sources":["internal/THEOplayerView.web.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAEhD,SAASC,MAAM,EAAEC,gBAAgB,QAA6B,YAAY;AAC1E,SAASC,oBAAoB,QAAQ,gCAAgC;AAErE,OAAO,SAASC,cAAcA,CAACC,KAAmD,EAAE;EAClF,MAAM;IAAEC,MAAM;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAClC,MAAMG,MAAM,GAAGR,MAAM,CAA0B,IAAI,CAAC;EACpD,MAAMS,OAAO,GAAGT,MAAM,CAA8B,IAAI,CAAC;EACzD,MAAMU,SAAS,GAAGV,MAAM,CAAwB,IAAI,CAAC;EAErDD,SAAS,CAA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E,OAAO,CAAC;MACnC;MACAF,OAAO,EAAEE,OAAO,EAAEgB,OAAO,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACjB,SAAS,CAAC,CAAC;EAEf,MAAME,UAAU,GAAGN,MAAM,EAAEM,UAAU,KAAKC,SAAS,IAAIP,MAAM,EAAEM,UAAU,KAAK,IAAI;EAClF,oBACEd,KAAA,CAAA8B,aAAA,CAAA9B,KAAA,CAAA+B,QAAA,qBACE/B,KAAA,CAAA8B,aAAA;IACEE,GAAG,EAAEpB,SAAU;IACfqB,KAAK,EAAEC,MAAM,CAACtB,SAAU;IACxBuB,SAAS,EAAErB,UAAU,GAAG,sBAAsB,GAAG;EAAgD,CAClG,CAAC,EACDL,QACD,CAAC;AAEP;AAEA,MAAMyB,MAAM,GAAG;EACb;EACA;EACAtB,SAAS,EAAE;IACTwB,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,SAAS,EAAE,OAAO;IAClBC,QAAQ,EAAE,OAAO;IACjBC,WAAW,EAAE;EACf;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ import { NativeModules, Platform } from 'react-native';
2
+ const NativePlaybackSettingsModule = NativeModules.THEORCTPlaybackSettingsModule;
3
+ const TAG = 'PlaybackSettings';
4
+ export class NativePlaybackSettings {
5
+ useFastStartup(useFastStartup) {
6
+ if (Platform.OS !== 'android') {
7
+ console.warn(TAG, 'useFastStartup is only available on Android platforms.');
8
+ return;
9
+ }
10
+ NativePlaybackSettingsModule.useFastStartup(useFastStartup);
11
+ }
12
+ setLipSyncCorrection(correctionMs) {
13
+ if (Platform.OS !== 'android') {
14
+ console.warn(TAG, 'setLipSyncCorrect is only available on Android platforms.');
15
+ return;
16
+ }
17
+ NativePlaybackSettingsModule.setLipSyncCorrection(correctionMs);
18
+ }
19
+ }
20
+ export const PlaybackSettings = new NativePlaybackSettings();
21
+ //# sourceMappingURL=PlaybackSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeModules","Platform","NativePlaybackSettingsModule","THEORCTPlaybackSettingsModule","TAG","NativePlaybackSettings","useFastStartup","OS","console","warn","setLipSyncCorrection","correctionMs","PlaybackSettings"],"sourceRoot":"../../../../src","sources":["internal/playback/PlaybackSettings.ts"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAGtD,MAAMC,4BAA4B,GAAGF,aAAa,CAACG,6BAA6B;AAEhF,MAAMC,GAAG,GAAG,kBAAkB;AAE9B,OAAO,MAAMC,sBAAsB,CAAgC;EACjEC,cAAcA,CAACA,cAAuB,EAAQ;IAC5C,IAAIL,QAAQ,CAACM,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACL,GAAG,EAAE,wDAAwD,CAAC;MAC3E;IACF;IACAF,4BAA4B,CAACI,cAAc,CAACA,cAAc,CAAC;EAC7D;EACAI,oBAAoBA,CAACC,YAAoB,EAAQ;IAC/C,IAAIV,QAAQ,CAACM,EAAE,KAAK,SAAS,EAAE;MAC7BC,OAAO,CAACC,IAAI,CAACL,GAAG,EAAE,2DAA2D,CAAC;MAC9E;IACF;IACAF,4BAA4B,CAACQ,oBAAoB,CAACC,YAAY,CAAC;EACjE;AACF;AAEA,OAAO,MAAMC,gBAAqC,GAAG,IAAIP,sBAAsB,CAAC,CAAC","ignoreList":[]}
@@ -40,5 +40,13 @@ export interface GoogleImaConfiguration {
40
40
  * @defaultValue `false`
41
41
  */
42
42
  enableDebugMode?: boolean;
43
+ /**
44
+ * Maximum recommended bitrate. The value is in kbit/s. SDK will pick media with bitrate below the specified max,
45
+ * or the closest bitrate if there is no media with smaller bitrate found. Default value -1, means the bitrate will
46
+ * be selected by the SDK.
47
+ *
48
+ * @defaultValue `-1`
49
+ */
50
+ bitrate?: number;
43
51
  }
44
52
  //# sourceMappingURL=GoogleImaConfiguration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GoogleImaConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/api/ads/GoogleImaConfiguration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
1
+ {"version":3,"file":"GoogleImaConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/api/ads/GoogleImaConfiguration.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * The playback settings for all instances of THEOplayer.
3
+ */
4
+ export interface PlaybackSettingsAPI {
5
+ /**
6
+ * The player starts the playback as soon as the first video data is available related to the initial playback position.
7
+ *
8
+ * <ul>
9
+ * <li>Using this feature will sacrifice the accuracy of the initial seek position
10
+ * <li>This API is in an experimental stage and may be subject to breaking changes.
11
+ * </ul>
12
+ *
13
+ * @experimental
14
+ * @param {boolean} useFastStartup Whether fast startup is enabled.
15
+ *
16
+ * @remarks
17
+ * - This API is experimental.
18
+ * - This property is supported on Android platforms only.
19
+ */
20
+ useFastStartup(useFastStartup: boolean): void;
21
+ /**
22
+ * Sets the lip sync correction delay.
23
+ *
24
+ * This method adjusts the synchronization between audio and video playback for all instances of THEOplayer
25
+ * by applying a specified correction delay.
26
+ *
27
+ * @experimental
28
+ * @since Native THEOplayer SDK v8.1.0.
29
+ * @param {number} correctionMs The correction delay in milliseconds.
30
+ * Positive values advance the audio, while negative values delay it.
31
+ *
32
+ * @remarks
33
+ * - This API is experimental.
34
+ * - This property is supported on Android platforms only.
35
+ */
36
+ setLipSyncCorrection(correctionMs: number): void;
37
+ }
38
+ //# sourceMappingURL=PlaybackSettingsAPI.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaybackSettingsAPI.d.ts","sourceRoot":"","sources":["../../../../src/api/playback/PlaybackSettingsAPI.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAElC;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,cAAc,EAAE,OAAO,GAAG,IAAI,CAAC;IAE9C;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAClD"}
@@ -0,0 +1,2 @@
1
+ export * from './PlaybackSettingsAPI';
2
+ //# sourceMappingURL=barrel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barrel.d.ts","sourceRoot":"","sources":["../../../../src/api/playback/barrel.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -2,4 +2,5 @@ export * from './api/barrel';
2
2
  export { THEOplayerView } from './internal/THEOplayerView';
3
3
  export { ContentProtectionRegistry } from './internal/drm/ContentProtectionRegistry';
4
4
  export { MediaCache } from './internal/cache/MediaCache';
5
+ export { PlaybackSettings } from './internal/playback/PlaybackSettings';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"THEOplayerView.web.d.ts","sourceRoot":"","sources":["../../../src/internal/THEOplayerView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAInE,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,qBAuEjF"}
1
+ {"version":3,"file":"THEOplayerView.web.d.ts","sourceRoot":"","sources":["../../../src/internal/THEOplayerView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAInE,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,qBAwEjF"}
@@ -0,0 +1,7 @@
1
+ import { PlaybackSettingsAPI } from '../../api/playback/PlaybackSettingsAPI';
2
+ export declare class NativePlaybackSettings implements PlaybackSettingsAPI {
3
+ useFastStartup(useFastStartup: boolean): void;
4
+ setLipSyncCorrection(correctionMs: number): void;
5
+ }
6
+ export declare const PlaybackSettings: PlaybackSettingsAPI;
7
+ //# sourceMappingURL=PlaybackSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlaybackSettings.d.ts","sourceRoot":"","sources":["../../../../src/internal/playback/PlaybackSettings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAM7E,qBAAa,sBAAuB,YAAW,mBAAmB;IAChE,cAAc,CAAC,cAAc,EAAE,OAAO,GAAG,IAAI;IAO7C,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI;CAOjD;AAED,eAAO,MAAM,gBAAgB,EAAE,mBAAkD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-theoplayer",
3
- "version": "8.0.3",
3
+ "version": "8.2.0",
4
4
  "description": "A THEOplayer video component for react-native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -25,14 +25,19 @@
25
25
  ],
26
26
  "scripts": {
27
27
  "typescript": "tsc --noEmit",
28
- "prettier": "prettier --check .",
29
- "prettier:fix": "prettier --write .",
28
+ "prettier": "prettier --check \"(src|example)/**/*.{js,jsx,ts,tsx}\"",
29
+ "prettier:fix": "prettier --write \"(src|example)/**/*.{js,jsx,ts,tsx}\"",
30
30
  "lint": "eslint \"**/*.{ts,tsx}\"",
31
31
  "lint:fix": "npm run lint -- --fix",
32
32
  "prepare": "bob build && husky install",
33
33
  "pods": "cd example && pod-install --quiet",
34
34
  "docs": "typedoc --treatWarningsAsErrors"
35
35
  },
36
+ "lint-staged": {
37
+ "(src|example)/**/*.{js,jsx,ts,tsx}": [
38
+ "prettier --write"
39
+ ]
40
+ },
36
41
  "keywords": [
37
42
  "react-native",
38
43
  "THEOplayer",
@@ -56,6 +61,7 @@
56
61
  "eslint": "^8.57.0",
57
62
  "eslint-config-prettier": "^9.1.0",
58
63
  "husky": "^9.1.5",
64
+ "lint-staged": "^15.2.10",
59
65
  "pod-install": "^0.1.39",
60
66
  "prettier": "^3.3.3",
61
67
  "react": "^18.2.0",
@@ -43,4 +43,13 @@ export interface GoogleImaConfiguration {
43
43
  * @defaultValue `false`
44
44
  */
45
45
  enableDebugMode?: boolean;
46
+
47
+ /**
48
+ * Maximum recommended bitrate. The value is in kbit/s. SDK will pick media with bitrate below the specified max,
49
+ * or the closest bitrate if there is no media with smaller bitrate found. Default value -1, means the bitrate will
50
+ * be selected by the SDK.
51
+ *
52
+ * @defaultValue `-1`
53
+ */
54
+ bitrate?: number;
46
55
  }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The playback settings for all instances of THEOplayer.
3
+ */
4
+ export interface PlaybackSettingsAPI {
5
+
6
+ /**
7
+ * The player starts the playback as soon as the first video data is available related to the initial playback position.
8
+ *
9
+ * <ul>
10
+ * <li>Using this feature will sacrifice the accuracy of the initial seek position
11
+ * <li>This API is in an experimental stage and may be subject to breaking changes.
12
+ * </ul>
13
+ *
14
+ * @experimental
15
+ * @param {boolean} useFastStartup Whether fast startup is enabled.
16
+ *
17
+ * @remarks
18
+ * - This API is experimental.
19
+ * - This property is supported on Android platforms only.
20
+ */
21
+ useFastStartup(useFastStartup: boolean): void;
22
+
23
+ /**
24
+ * Sets the lip sync correction delay.
25
+ *
26
+ * This method adjusts the synchronization between audio and video playback for all instances of THEOplayer
27
+ * by applying a specified correction delay.
28
+ *
29
+ * @experimental
30
+ * @since Native THEOplayer SDK v8.1.0.
31
+ * @param {number} correctionMs The correction delay in milliseconds.
32
+ * Positive values advance the audio, while negative values delay it.
33
+ *
34
+ * @remarks
35
+ * - This API is experimental.
36
+ * - This property is supported on Android platforms only.
37
+ */
38
+ setLipSyncCorrection(correctionMs: number): void;
39
+ }
@@ -0,0 +1 @@
1
+ export * from './PlaybackSettingsAPI';
package/src/index.tsx CHANGED
@@ -2,3 +2,4 @@ export * from './api/barrel';
2
2
  export { THEOplayerView } from './internal/THEOplayerView';
3
3
  export { ContentProtectionRegistry } from './internal/drm/ContentProtectionRegistry';
4
4
  export { MediaCache } from './internal/cache/MediaCache';
5
+ export { PlaybackSettings } from './internal/playback/PlaybackSettings';
@@ -16,6 +16,7 @@ export function THEOplayerView(props: React.PropsWithChildren<THEOplayerViewProp
16
16
  const ads = {
17
17
  ...config?.ads,
18
18
  googleIma: {
19
+ ...config?.ads?.ima,
19
20
  useNativeIma: true,
20
21
  language: config?.ui?.language ?? 'en',
21
22
  },
@@ -0,0 +1,25 @@
1
+ import { NativeModules, Platform } from 'react-native';
2
+ import { PlaybackSettingsAPI } from '../../api/playback/PlaybackSettingsAPI';
3
+
4
+ const NativePlaybackSettingsModule = NativeModules.THEORCTPlaybackSettingsModule;
5
+
6
+ const TAG = 'PlaybackSettings';
7
+
8
+ export class NativePlaybackSettings implements PlaybackSettingsAPI {
9
+ useFastStartup(useFastStartup: boolean): void {
10
+ if (Platform.OS !== 'android') {
11
+ console.warn(TAG, 'useFastStartup is only available on Android platforms.');
12
+ return;
13
+ }
14
+ NativePlaybackSettingsModule.useFastStartup(useFastStartup);
15
+ }
16
+ setLipSyncCorrection(correctionMs: number): void {
17
+ if (Platform.OS !== 'android') {
18
+ console.warn(TAG, 'setLipSyncCorrect is only available on Android platforms.');
19
+ return;
20
+ }
21
+ NativePlaybackSettingsModule.setLipSyncCorrection(correctionMs);
22
+ }
23
+ }
24
+
25
+ export const PlaybackSettings: PlaybackSettingsAPI = new NativePlaybackSettings();