react-native-theoplayer 8.0.3 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/8.0.0/ads-wrapper-8.0.0.pom +15 -0
- package/android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt +16 -1
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +2 -1
- package/ios/ads/THEOplayerRCTView+Ads.swift +4 -0
- package/ios/ads/THEOplayerRCTView+AdsConfig.swift +8 -0
- package/ios/presentationMode/THEOplayerRCTPresentationModeManager.swift +51 -11
- package/lib/commonjs/internal/THEOplayerView.web.js +1 -0
- package/lib/commonjs/internal/THEOplayerView.web.js.map +1 -1
- package/lib/module/internal/THEOplayerView.web.js +1 -0
- package/lib/module/internal/THEOplayerView.web.js.map +1 -1
- package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts +8 -0
- package/lib/typescript/api/ads/GoogleImaConfiguration.d.ts.map +1 -1
- package/lib/typescript/internal/THEOplayerView.web.d.ts.map +1 -1
- package/package.json +9 -3
- package/src/api/ads/GoogleImaConfiguration.ts +9 -0
- package/src/internal/THEOplayerView.web.tsx +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.1.0] - 24-09-23
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added support for `bitrate` config on the GoogleIMAConfiguration, to be passed to the IMA SDK rendering settings.
|
|
13
|
+
- Added support on iOS and Android for `allowedMimeTypes` config on the AdsConfiguration, to be passed to the IMA SDK rendering settings.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Fixed an issue where cast events were not forwarded from the native Android SDK.
|
|
18
|
+
- Fixed an issue where presentationMode changes on iOS would cause a UIViewControllerHierarchyInconsistency when an ad is playing.
|
|
19
|
+
- Fixed an issue where some ad event types could not be resolved at runtime when excluding the IMA integration on Android.
|
|
20
|
+
|
|
8
21
|
## [8.0.3] - 24-09-14
|
|
9
22
|
|
|
10
23
|
### Fixed
|
package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/8.0.0/ads-wrapper-8.0.0.pom
CHANGED
|
@@ -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
|
}
|
|
@@ -52,7 +52,8 @@ class ReactTHEOplayerView(private val reactContext: ThemedReactContext) :
|
|
|
52
52
|
playerContext = ReactTHEOplayerContext.create(
|
|
53
53
|
reactContext,
|
|
54
54
|
PlayerConfigAdapter(configProps)
|
|
55
|
-
)
|
|
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
|
|
@@ -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?
|
|
14
|
-
private var
|
|
15
|
-
private var
|
|
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.
|
|
47
|
-
|
|
48
|
-
|
|
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.
|
|
57
|
-
|
|
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
|
}
|
|
@@ -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,IAA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AEC,MAAM;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAClC,MAAMG,MAAM,GAAG,IAAAC,aAAM,EAA0B,IAAI,CAAC;EACpD,MAAMC,OAAO,GAAG,IAAAD,aAAM,EAA8B,IAAI,CAAC;EACzD,MAAME,SAAS,GAAG,IAAAF,aAAM,EAAwB,IAAI,CAAC;EAErD,IAAAG,gBAAS,EAAC,MAAM;IACd;IACA,IAAID,SAAS,CAACE,OAAO,EAAE;MACrB,MAAMC,UAAU,GAAGR,MAAM,EAAEQ,UAAU,KAAK,IAAI,IAAIR,MAAM,EAAEQ,UAAU,KAAKC,SAAS;MAClF,MAAMC,GAAG,GAAG;QACV,GAAGV,MAAM,EAAEU,GAAG;QACdC,SAAS,EAAE;
|
|
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,wB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,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACrB,SAAS,CAAC,CAAC;EAEf,MAAMG,UAAU,GAAGR,MAAM,EAAEQ,UAAU,KAAKC,SAAS,IAAIT,MAAM,EAAEQ,UAAU,KAAK,IAAI;EAClF,oBACEnC,MAAA,CAAAW,OAAA,CAAA2C,aAAA,CAAAtD,MAAA,CAAAW,OAAA,CAAA4C,QAAA,qBACEvD,MAAA,CAAAW,OAAA,CAAA2C,aAAA;IACEE,GAAG,EAAExB,SAAU;IACfyB,KAAK,EAAEC,MAAM,CAAC1B,SAAU;IACxB2B,SAAS,EAAExB,UAAU,GAAG,sBAAsB,GAAG;EAAgD,CAClG,CAAC,EACDP,QACD,CAAC;AAEP;AAEA,MAAM8B,MAAM,GAAG;EACb;EACA;EACA1B,SAAS,EAAE;IACT4B,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 +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,GAAG,GAAG;QACV,GAAGR,MAAM,EAAEQ,GAAG;QACdC,SAAS,EAAE;
|
|
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,CAAC,MAAM;IACd;IACA,IAAIW,SAAS,CAACC,OAAO,EAAE;MACrB,MAAMC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AAC,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":[]}
|
|
@@ -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;
|
|
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"}
|
|
@@ -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,
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-theoplayer",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.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
|
}
|