react-native-theoplayer 7.4.0 → 7.5.1
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/README.md +12 -12
- package/android/build.gradle +5 -4
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.1/ads-wrapper-7.6.1.aar +0 -0
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/{7.0.0/ads-wrapper-7.0.0.pom → 7.6.1/ads-wrapper-7.6.1.pom} +2 -2
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml +4 -4
- package/android/src/main/java/com/theoplayer/PlayerEventEmitter.kt +8 -9
- package/android/src/main/java/com/theoplayer/ReactTHEOplayerView.kt +1 -3
- package/android/src/main/java/com/theoplayer/ads/AdAdapter.kt +9 -0
- package/android/src/main/java/com/theoplayer/ads/AdEventAdapter.kt +20 -39
- package/android/src/main/java/com/theoplayer/source/GoogleDaiSourceAdapter.kt +34 -0
- package/android/src/main/java/com/theoplayer/source/SSAIAdapterRegistry.kt +51 -0
- package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +23 -58
- package/lib/commonjs/api/source/ads/barrel.js +0 -22
- package/lib/commonjs/api/source/ads/barrel.js.map +1 -1
- package/lib/commonjs/api/source/ads/ssai/barrel.js +0 -22
- package/lib/commonjs/api/source/ads/ssai/barrel.js.map +1 -1
- package/lib/commonjs/internal/THEOplayerView.js +3 -2
- package/lib/commonjs/internal/THEOplayerView.js.map +1 -1
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js +2 -2
- package/lib/commonjs/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeCastAdapter.js +3 -3
- package/lib/commonjs/internal/adapter/cast/THEOplayerNativeCastAdapter.js.map +1 -1
- package/lib/module/api/source/ads/barrel.js +0 -2
- package/lib/module/api/source/ads/barrel.js.map +1 -1
- package/lib/module/api/source/ads/ssai/barrel.js +0 -2
- package/lib/module/api/source/ads/ssai/barrel.js.map +1 -1
- package/lib/module/internal/THEOplayerView.js +3 -2
- package/lib/module/internal/THEOplayerView.js.map +1 -1
- package/lib/module/internal/adapter/THEOplayerAdapter.js +2 -2
- package/lib/module/internal/adapter/THEOplayerAdapter.js.map +1 -1
- package/lib/module/internal/adapter/cast/THEOplayerNativeCastAdapter.js +3 -3
- package/lib/module/internal/adapter/cast/THEOplayerNativeCastAdapter.js.map +1 -1
- package/lib/typescript/api/source/ads/barrel.d.ts +0 -2
- package/lib/typescript/api/source/ads/barrel.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/ssai/GoogleDAIConfiguration.d.ts +0 -9
- package/lib/typescript/api/source/ads/ssai/GoogleDAIConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts +3 -10
- package/lib/typescript/api/source/ads/ssai/ServerSideAdInsertionConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/ssai/barrel.d.ts +0 -2
- package/lib/typescript/api/source/ads/ssai/barrel.d.ts.map +1 -1
- package/lib/typescript/internal/THEOplayerView.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts +1 -1
- package/lib/typescript/internal/adapter/THEOplayerAdapter.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/cast/THEOplayerNativeCastAdapter.d.ts +1 -1
- package/lib/typescript/internal/adapter/cast/THEOplayerNativeCastAdapter.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/source/ads/barrel.ts +0 -2
- package/src/api/source/ads/ssai/GoogleDAIConfiguration.ts +0 -9
- package/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts +3 -10
- package/src/api/source/ads/ssai/barrel.ts +0 -2
- package/src/internal/THEOplayerView.tsx +3 -2
- package/src/internal/adapter/THEOplayerAdapter.ts +2 -2
- package/src/internal/adapter/cast/THEOplayerNativeCastAdapter.ts +3 -3
- package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.0.0/ads-wrapper-7.0.0.aar +0 -0
- package/lib/commonjs/api/source/ads/FreeWheelAdDescription.js +0 -6
- package/lib/commonjs/api/source/ads/FreeWheelAdDescription.js.map +0 -1
- package/lib/commonjs/api/source/ads/SpotXAdDescription.js +0 -6
- package/lib/commonjs/api/source/ads/SpotXAdDescription.js.map +0 -1
- package/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js +0 -6
- package/lib/commonjs/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js.map +0 -1
- package/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js +0 -6
- package/lib/commonjs/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js.map +0 -1
- package/lib/module/api/source/ads/FreeWheelAdDescription.js +0 -2
- package/lib/module/api/source/ads/FreeWheelAdDescription.js.map +0 -1
- package/lib/module/api/source/ads/SpotXAdDescription.js +0 -2
- package/lib/module/api/source/ads/SpotXAdDescription.js.map +0 -1
- package/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js +0 -2
- package/lib/module/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.js.map +0 -1
- package/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js +0 -2
- package/lib/module/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.js.map +0 -1
- package/lib/typescript/api/source/ads/FreeWheelAdDescription.d.ts +0 -86
- package/lib/typescript/api/source/ads/FreeWheelAdDescription.d.ts.map +0 -1
- package/lib/typescript/api/source/ads/SpotXAdDescription.d.ts +0 -116
- package/lib/typescript/api/source/ads/SpotXAdDescription.d.ts.map +0 -1
- package/lib/typescript/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts +0 -28
- package/lib/typescript/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.d.ts.map +0 -1
- package/lib/typescript/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts +0 -47
- package/lib/typescript/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.d.ts.map +0 -1
- package/src/api/source/ads/FreeWheelAdDescription.ts +0 -97
- package/src/api/source/ads/SpotXAdDescription.ts +0 -126
- package/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.ts +0 -30
- package/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.ts +0 -51
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
|
+
## [7.5.1] - 24-06-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added ad event support for custom SSAI integrations.
|
|
13
|
+
|
|
14
|
+
## [7.5.0] - 24-06-18
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Fixed an issue where the Cast API wouldn't be initialized yet when in the `onPlayerReady` callback.
|
|
19
|
+
- Added support for THEOplayer Android v7.6.0.
|
|
20
|
+
|
|
8
21
|
## [7.4.0] - 24-06-11
|
|
9
22
|
|
|
10
23
|
### Added
|
package/README.md
CHANGED
|
@@ -131,18 +131,18 @@ please reach out to us for support.
|
|
|
131
131
|
The `react-native-theoplayer` package can be combined with any number of connectors to provide extra
|
|
132
132
|
functionality. Currently, the following connectors are available:
|
|
133
133
|
|
|
134
|
-
|
|
|
135
|
-
|
|
136
|
-
| [
|
|
137
|
-
| [
|
|
138
|
-
| [
|
|
139
|
-
| [
|
|
140
|
-
| [
|
|
141
|
-
| [
|
|
142
|
-
| [
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
|
|
|
134
|
+
| Connector | npm package | Source |
|
|
135
|
+
|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
|
|
136
|
+
| Adobe analytics, implementing the Media Collections API | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-adobe) | [`Adobe`](https://github.com/THEOplayer/react-native-connectors/tree/main/adobe) |
|
|
137
|
+
| Agama analytics | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-agama) | [`Agama`](https://github.com/THEOplayer/react-native-connectors/tree/main/agama) |
|
|
138
|
+
| Comscore analytics | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-comscore) | [`Comscore`](https://github.com/THEOplayer/react-native-connectors/tree/main/comscore) |
|
|
139
|
+
| Conviva analytics | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-conviva) | [`Conviva`](https://github.com/THEOplayer/react-native-connectors/tree/main/conviva) |
|
|
140
|
+
| Mux analytics | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-mux) | [`Mux`](https://github.com/THEOplayer/react-native-connectors/tree/main/mux) |
|
|
141
|
+
| Nielsen analytics | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-nielsen) | [`Nielsen`](https://github.com/THEOplayer/react-native-connectors/tree/main/nielsen) |
|
|
142
|
+
| Youbora analytics | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-analytics-youbora) | [`Youbora`](https://github.com/THEOplayer/react-native-connectors/tree/main/youbora) |
|
|
143
|
+
| Content protection (DRM) | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-drm) | [`DRM`](https://github.com/THEOplayer/react-native-theoplayer-drm) |
|
|
144
|
+
| React Native Open UI | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-ui) | [`Open UI`](https://github.com/THEOplayer/react-native-theoplayer-ui) |
|
|
145
|
+
| A template for<br/>`react-native-theoplayer` connectors. | [](https://www.npmjs.com/package/%40theoplayer%2Freact-native-connector-template) | [`Connector template`](https://github.com/THEOplayer/react-native-theoplayer-connector-template) |
|
|
146
146
|
|
|
147
147
|
## Creating your first app
|
|
148
148
|
|
package/android/build.gradle
CHANGED
|
@@ -112,13 +112,14 @@ dependencies {
|
|
|
112
112
|
implementation "androidx.appcompat:appcompat:${safeExtGet('appcompatVersion', '1.6.1')}"
|
|
113
113
|
implementation "androidx.core:core-ktx:${safeExtGet('corektxVersion', '1.10.1')}"
|
|
114
114
|
|
|
115
|
-
// The minimum supported THEOplayer version is 7.
|
|
116
|
-
def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.
|
|
115
|
+
// The minimum supported THEOplayer version is 7.6.0
|
|
116
|
+
def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.6.0, 8.0.0)')
|
|
117
|
+
def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[7.5.0, 8.0.0)')
|
|
117
118
|
|
|
118
119
|
println("Using THEOplayer (${versionString(theoplayer_sdk_version)})")
|
|
119
120
|
implementation "com.theoplayer.theoplayer-sdk-android:core:${theoplayer_sdk_version}"
|
|
120
|
-
implementation "com.theoplayer.theoplayer-sdk-android:ads-wrapper:7.
|
|
121
|
-
implementation "com.theoplayer.android-connector:mediasession:${
|
|
121
|
+
implementation "com.theoplayer.theoplayer-sdk-android:ads-wrapper:7.6.1"
|
|
122
|
+
implementation "com.theoplayer.android-connector:mediasession:${theoplayer_mediasession_version}"
|
|
122
123
|
|
|
123
124
|
if (enabledGoogleIMA) {
|
|
124
125
|
println('Enable THEOplayer IMA extension.')
|
package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.1/ads-wrapper-7.6.1.aar
ADDED
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
3
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
4
|
-
<modelVersion>7.
|
|
4
|
+
<modelVersion>7.6.1</modelVersion>
|
|
5
5
|
<groupId>com.theoplayer.theoplayer-sdk-android</groupId>
|
|
6
6
|
<artifactId>ads-wrapper</artifactId>
|
|
7
|
-
<version>7.
|
|
7
|
+
<version>7.6.1</version>
|
|
8
8
|
<packaging>aar</packaging>
|
|
9
9
|
</project>
|
package/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>com.theoplayer.theoplayer-sdk-android</groupId>
|
|
4
4
|
<artifactId>ads-wrapper</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>7.
|
|
7
|
-
<release>7.
|
|
6
|
+
<latest>7.6.1</latest>
|
|
7
|
+
<release>7.6.1</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>7.
|
|
9
|
+
<version>7.6.1</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20240620111503</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -652,15 +652,14 @@ class PlayerEventEmitter internal constructor(
|
|
|
652
652
|
)
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
-
// Attach
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
}
|
|
655
|
+
// Attach ad event adapter
|
|
656
|
+
adEventAdapter = AdEventAdapter(playerView.adsApi,
|
|
657
|
+
object : AdEventEmitter {
|
|
658
|
+
override fun emit(payload: WritableMap?) {
|
|
659
|
+
receiveEvent(EVENT_AD_EVENT, payload)
|
|
660
|
+
}
|
|
661
|
+
})
|
|
662
|
+
|
|
664
663
|
if (BuildConfig.EXTENSION_CAST) {
|
|
665
664
|
castEventAdapter = playerView.castApi?.let {
|
|
666
665
|
CastEventAdapter(it, object : CastEventAdapter.Emitter {
|
|
@@ -54,9 +54,7 @@ class ReactTHEOplayerView(private val reactContext: ThemedReactContext) :
|
|
|
54
54
|
reactContext,
|
|
55
55
|
PlayerConfigAdapter(configProps)
|
|
56
56
|
).apply {
|
|
57
|
-
|
|
58
|
-
adsApi.initialize(player, imaIntegration, daiIntegration)
|
|
59
|
-
}
|
|
57
|
+
adsApi.initialize(player, imaIntegration, daiIntegration)
|
|
60
58
|
val layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
61
59
|
playerView.layoutParams = layoutParams
|
|
62
60
|
(playerView.parent as? ViewGroup)?.removeView(playerView)
|
|
@@ -16,6 +16,7 @@ import java.lang.Exception
|
|
|
16
16
|
|
|
17
17
|
private const val PROP_AD_SYSTEM = "adSystem"
|
|
18
18
|
private const val PROP_AD_INTEGRATION = "integration"
|
|
19
|
+
private const val PROP_AD_CUSTOM_INTEGRATION = "customIntegration"
|
|
19
20
|
private const val PROP_AD_TYPE = "type"
|
|
20
21
|
private const val PROP_AD_ID = "id"
|
|
21
22
|
private const val PROP_AD_BREAK = "adBreak"
|
|
@@ -208,6 +209,10 @@ object AdAdapter {
|
|
|
208
209
|
return AdIntegrationKind.from(ad.getString(PROP_AD_INTEGRATION))
|
|
209
210
|
}
|
|
210
211
|
|
|
212
|
+
override fun getCustomIntegration(): String? {
|
|
213
|
+
return ad.getString(PROP_AD_CUSTOM_INTEGRATION)
|
|
214
|
+
}
|
|
215
|
+
|
|
211
216
|
override fun getImaAd(): com.google.ads.interactivemedia.v3.api.Ad {
|
|
212
217
|
return parseImaAd(ad)
|
|
213
218
|
}
|
|
@@ -279,6 +284,10 @@ object AdAdapter {
|
|
|
279
284
|
override fun getIntegration(): AdIntegrationKind {
|
|
280
285
|
return AdIntegrationKind.from(adBreak.getString(PROP_ADBREAK_INTEGRATION))
|
|
281
286
|
}
|
|
287
|
+
|
|
288
|
+
override fun getCustomIntegration(): String? {
|
|
289
|
+
return adBreak.getString(PROP_AD_CUSTOM_INTEGRATION)
|
|
290
|
+
}
|
|
282
291
|
}
|
|
283
292
|
}
|
|
284
293
|
|
|
@@ -13,33 +13,13 @@ import com.theoplayer.android.api.ads.ima.GoogleImaAdEventType
|
|
|
13
13
|
import com.theoplayer.android.api.ads.wrapper.AdEventListener
|
|
14
14
|
import com.theoplayer.android.api.event.EventType
|
|
15
15
|
import com.theoplayer.android.api.event.ads.AdEvent
|
|
16
|
+
import com.theoplayer.android.api.event.ads.AdsEventTypes
|
|
16
17
|
import java.util.*
|
|
17
18
|
|
|
18
19
|
private const val EVENT_PROP_AD = "ad"
|
|
19
20
|
private const val EVENT_PROP_TYPE = "type"
|
|
20
21
|
private const val EVENT_PROP_SUBTYPE = "subType"
|
|
21
22
|
|
|
22
|
-
private val ALL_AD_EVENTS = arrayOf(
|
|
23
|
-
GoogleImaAdEventType.LOADED,
|
|
24
|
-
GoogleImaAdEventType.AD_BREAK_STARTED,
|
|
25
|
-
GoogleImaAdEventType.STARTED,
|
|
26
|
-
GoogleImaAdEventType.FIRST_QUARTILE,
|
|
27
|
-
GoogleImaAdEventType.MIDPOINT,
|
|
28
|
-
GoogleImaAdEventType.THIRD_QUARTILE,
|
|
29
|
-
GoogleImaAdEventType.COMPLETED,
|
|
30
|
-
GoogleImaAdEventType.AD_BREAK_ENDED,
|
|
31
|
-
GoogleImaAdEventType.SKIPPED,
|
|
32
|
-
GoogleImaAdEventType.AD_ERROR,
|
|
33
|
-
GoogleImaAdEventType.AD_BUFFERING,
|
|
34
|
-
GoogleImaAdEventType.AD_BREAK_FETCH_ERROR,
|
|
35
|
-
GoogleImaAdEventType.CONTENT_PAUSE_REQUESTED,
|
|
36
|
-
GoogleImaAdEventType.CONTENT_RESUME_REQUESTED,
|
|
37
|
-
GoogleImaAdEventType.CLICKED,
|
|
38
|
-
GoogleImaAdEventType.TAPPED,
|
|
39
|
-
GoogleImaAdEventType.ICON_TAPPED,
|
|
40
|
-
GoogleImaAdEventType.ICON_FALLBACK_IMAGE_CLOSED,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
23
|
class AdEventAdapter(private val adsApi: AdsApiWrapper, eventEmitter: AdEventEmitter) {
|
|
44
24
|
private val eventListener: AdEventListener
|
|
45
25
|
|
|
@@ -71,9 +51,7 @@ class AdEventAdapter(private val adsApi: AdsApiWrapper, eventEmitter: AdEventEmi
|
|
|
71
51
|
eventEmitter.emit(payload)
|
|
72
52
|
}
|
|
73
53
|
}
|
|
74
|
-
|
|
75
|
-
adsApi.addEventListener(eventType, eventListener)
|
|
76
|
-
}
|
|
54
|
+
adsApi.addAllEventsListener(eventListener)
|
|
77
55
|
}
|
|
78
56
|
|
|
79
57
|
companion object {
|
|
@@ -123,33 +101,36 @@ class AdEventAdapter(private val adsApi: AdsApiWrapper, eventEmitter: AdEventEmi
|
|
|
123
101
|
}
|
|
124
102
|
|
|
125
103
|
private fun mapAdType(eventType: EventType<*>): String {
|
|
126
|
-
return when (eventType
|
|
127
|
-
GoogleImaAdEventType.LOADED -> "adloaded"
|
|
128
|
-
GoogleImaAdEventType.STARTED -> "adbegin"
|
|
129
|
-
GoogleImaAdEventType.FIRST_QUARTILE -> "adfirstquartile"
|
|
130
|
-
GoogleImaAdEventType.MIDPOINT -> "admidpoint"
|
|
131
|
-
GoogleImaAdEventType.THIRD_QUARTILE -> "adthirdquartile"
|
|
132
|
-
GoogleImaAdEventType.COMPLETED -> "adend"
|
|
133
|
-
GoogleImaAdEventType.SKIPPED -> "adskip"
|
|
134
|
-
GoogleImaAdEventType.AD_ERROR -> "aderror"
|
|
104
|
+
return when (eventType) {
|
|
105
|
+
GoogleImaAdEventType.LOADED, AdsEventTypes.AD_LOADED -> "adloaded"
|
|
106
|
+
GoogleImaAdEventType.STARTED, AdsEventTypes.AD_BEGIN -> "adbegin"
|
|
107
|
+
GoogleImaAdEventType.FIRST_QUARTILE, AdsEventTypes.AD_FIRST_QUARTILE -> "adfirstquartile"
|
|
108
|
+
GoogleImaAdEventType.MIDPOINT, AdsEventTypes.AD_MIDPOINT -> "admidpoint"
|
|
109
|
+
GoogleImaAdEventType.THIRD_QUARTILE, AdsEventTypes.AD_THIRD_QUARTILE -> "adthirdquartile"
|
|
110
|
+
GoogleImaAdEventType.COMPLETED, AdsEventTypes.AD_END -> "adend"
|
|
111
|
+
GoogleImaAdEventType.SKIPPED, AdsEventTypes.AD_SKIP -> "adskip"
|
|
112
|
+
GoogleImaAdEventType.AD_ERROR, AdsEventTypes.AD_ERROR -> "aderror"
|
|
135
113
|
GoogleImaAdEventType.AD_BUFFERING -> "adbuffering"
|
|
136
114
|
GoogleImaAdEventType.CONTENT_PAUSE_REQUESTED -> "adbreakbegin"
|
|
137
115
|
GoogleImaAdEventType.CONTENT_RESUME_REQUESTED -> "adbreakend"
|
|
138
|
-
GoogleImaAdEventType.AD_BREAK_STARTED -> "adbreakbegin"
|
|
139
|
-
GoogleImaAdEventType.AD_BREAK_ENDED -> "adbreakend"
|
|
116
|
+
GoogleImaAdEventType.AD_BREAK_STARTED, AdsEventTypes.AD_BREAK_BEGIN -> "adbreakbegin"
|
|
117
|
+
GoogleImaAdEventType.AD_BREAK_ENDED, AdsEventTypes.AD_BREAK_END -> "adbreakend"
|
|
140
118
|
GoogleImaAdEventType.AD_BREAK_FETCH_ERROR -> "aderror"
|
|
141
119
|
GoogleImaAdEventType.CLICKED -> "adclicked"
|
|
142
120
|
GoogleImaAdEventType.TAPPED -> "adtapped"
|
|
143
121
|
GoogleImaAdEventType.ICON_TAPPED -> "adicontapped"
|
|
144
122
|
GoogleImaAdEventType.ICON_FALLBACK_IMAGE_CLOSED -> "adiconfallbackimageclosed"
|
|
145
|
-
|
|
123
|
+
AdsEventTypes.ADD_AD -> "addad"
|
|
124
|
+
AdsEventTypes.AD_IMPRESSION -> "adimpression"
|
|
125
|
+
AdsEventTypes.ADD_AD_BREAK -> "addadbreak"
|
|
126
|
+
AdsEventTypes.REMOVE_AD_BREAK -> "removeadbreak"
|
|
127
|
+
AdsEventTypes.AD_BREAK_CHANGE -> "adbreakchange"
|
|
128
|
+
else -> eventType.name.lowercase(Locale.getDefault())
|
|
146
129
|
}
|
|
147
130
|
}
|
|
148
131
|
}
|
|
149
132
|
|
|
150
133
|
fun destroy() {
|
|
151
|
-
|
|
152
|
-
adsApi.removeEventListener(eventType, eventListener)
|
|
153
|
-
}
|
|
134
|
+
adsApi.removeAllEventsListener(eventListener)
|
|
154
135
|
}
|
|
155
136
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
package com.theoplayer.source
|
|
2
|
+
|
|
3
|
+
import com.google.gson.Gson
|
|
4
|
+
import com.theoplayer.BuildConfig
|
|
5
|
+
import com.theoplayer.android.api.error.ErrorCode
|
|
6
|
+
import com.theoplayer.android.api.error.THEOplayerException
|
|
7
|
+
import com.theoplayer.android.api.source.GoogleDaiTypedSource
|
|
8
|
+
import com.theoplayer.android.api.source.TypedSource
|
|
9
|
+
import com.theoplayer.android.api.source.ssai.dai.GoogleDaiLiveConfiguration
|
|
10
|
+
import com.theoplayer.android.api.source.ssai.dai.GoogleDaiVodConfiguration
|
|
11
|
+
import org.json.JSONObject
|
|
12
|
+
|
|
13
|
+
private const val PROP_AVAILABILITY_TYPE = "availabilityType"
|
|
14
|
+
private const val AVAILABILITY_TYPE_VOD = "vod"
|
|
15
|
+
private const val ERROR_DAI_NOT_ENABLED = "Google DAI support not enabled."
|
|
16
|
+
|
|
17
|
+
@Throws(THEOplayerException::class)
|
|
18
|
+
fun googleDaiBuilderFromJson(builder: TypedSource.Builder, json: JSONObject): TypedSource.Builder {
|
|
19
|
+
// Check whether the integration was enabled
|
|
20
|
+
if (!BuildConfig.EXTENSION_GOOGLE_DAI) {
|
|
21
|
+
throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_DAI_NOT_ENABLED)
|
|
22
|
+
}
|
|
23
|
+
// We need to create a new builder as the player SDK checks for:
|
|
24
|
+
// typedSource is GoogleDaiTypedSource
|
|
25
|
+
return if (json.optString(PROP_AVAILABILITY_TYPE) == AVAILABILITY_TYPE_VOD) {
|
|
26
|
+
GoogleDaiTypedSource.Builder(
|
|
27
|
+
Gson().fromJson(json.toString(), GoogleDaiVodConfiguration::class.java)
|
|
28
|
+
)
|
|
29
|
+
} else {
|
|
30
|
+
GoogleDaiTypedSource.Builder(
|
|
31
|
+
Gson().fromJson(json.toString(), GoogleDaiLiveConfiguration::class.java)
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
package com.theoplayer.source
|
|
2
|
+
|
|
3
|
+
import android.text.TextUtils
|
|
4
|
+
import com.theoplayer.android.api.error.ErrorCode
|
|
5
|
+
import com.theoplayer.android.api.error.THEOplayerException
|
|
6
|
+
import com.theoplayer.android.api.source.SourceType
|
|
7
|
+
import com.theoplayer.android.api.source.TypedSource
|
|
8
|
+
import org.json.JSONObject
|
|
9
|
+
|
|
10
|
+
typealias CustomSSAIAdapter = (json: JSONObject, currentBuilder: TypedSource.Builder) -> TypedSource.Builder
|
|
11
|
+
|
|
12
|
+
private const val ERROR_UNSUPPORTED_SSAI_INTEGRATION = "Unsupported SSAI integration"
|
|
13
|
+
private const val ERROR_MISSING_SSAI_INTEGRATION = "Missing SSAI integration"
|
|
14
|
+
private const val PROP_INTEGRATION = "integration"
|
|
15
|
+
|
|
16
|
+
object SSAIAdapterRegistry {
|
|
17
|
+
private val _adapters: MutableMap<String, CustomSSAIAdapter> = HashMap()
|
|
18
|
+
|
|
19
|
+
fun register(integration: String, adapter: CustomSSAIAdapter) {
|
|
20
|
+
_adapters[integration] = adapter
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
fun hasIntegration(integration: String): Boolean {
|
|
24
|
+
return _adapters[integration] != null
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
fun typedSourceBuilderFromJson(json: JSONObject, currentBuilder: TypedSource.Builder, sourceType: SourceType?): TypedSource.Builder {
|
|
28
|
+
// Check for valid SsaiIntegration
|
|
29
|
+
val ssaiIntegrationStr = json.optString(PROP_INTEGRATION)
|
|
30
|
+
|
|
31
|
+
// Check for valid `integration` property, which is mandatory.
|
|
32
|
+
if (TextUtils.isEmpty(ssaiIntegrationStr)) {
|
|
33
|
+
throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_MISSING_SSAI_INTEGRATION)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Check for known SsaiIntegration
|
|
37
|
+
if (!hasIntegration(ssaiIntegrationStr)) {
|
|
38
|
+
throw THEOplayerException(
|
|
39
|
+
ErrorCode.AD_ERROR,
|
|
40
|
+
"$ERROR_UNSUPPORTED_SSAI_INTEGRATION: $ssaiIntegrationStr"
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Prefer DASH if SSAI type not specified
|
|
45
|
+
if (sourceType == null) {
|
|
46
|
+
currentBuilder.type(SourceType.DASH)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return _adapters[ssaiIntegrationStr]?.invoke(json, currentBuilder) ?: currentBuilder
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -2,11 +2,9 @@ package com.theoplayer.source
|
|
|
2
2
|
|
|
3
3
|
import android.text.TextUtils
|
|
4
4
|
import android.util.Log
|
|
5
|
-
import com.facebook.react.bridge.Arguments
|
|
6
5
|
import com.google.gson.Gson
|
|
7
6
|
import com.theoplayer.android.api.error.THEOplayerException
|
|
8
7
|
import com.facebook.react.bridge.ReadableMap
|
|
9
|
-
import com.facebook.react.bridge.WritableArray
|
|
10
8
|
import com.facebook.react.bridge.WritableMap
|
|
11
9
|
import com.theoplayer.android.api.source.SourceDescription
|
|
12
10
|
import com.theoplayer.android.api.source.TypedSource
|
|
@@ -14,10 +12,6 @@ import com.theoplayer.android.api.source.metadata.MetadataDescription
|
|
|
14
12
|
import com.theoplayer.android.api.source.addescription.AdDescription
|
|
15
13
|
import com.theoplayer.android.api.source.TextTrackDescription
|
|
16
14
|
import com.theoplayer.android.api.source.SourceType
|
|
17
|
-
import com.theoplayer.android.api.source.ssai.SsaiIntegration
|
|
18
|
-
import com.theoplayer.android.api.source.GoogleDaiTypedSource
|
|
19
|
-
import com.theoplayer.android.api.source.ssai.dai.GoogleDaiVodConfiguration
|
|
20
|
-
import com.theoplayer.android.api.source.ssai.dai.GoogleDaiLiveConfiguration
|
|
21
15
|
import com.theoplayer.android.api.source.hls.HlsPlaybackConfiguration
|
|
22
16
|
import com.theoplayer.android.api.event.ads.AdIntegrationKind
|
|
23
17
|
import com.theoplayer.android.api.source.addescription.GoogleImaAdDescription
|
|
@@ -55,19 +49,26 @@ private const val PROP_INTEGRATION = "integration"
|
|
|
55
49
|
private const val PROP_TEXT_TRACKS = "textTracks"
|
|
56
50
|
private const val PROP_POSTER = "poster"
|
|
57
51
|
private const val PROP_ADS = "ads"
|
|
58
|
-
private const val PROP_AVAILABILITY_TYPE = "availabilityType"
|
|
59
52
|
private const val PROP_DASH = "dash"
|
|
60
53
|
private const val PROP_DASH_IGNORE_AVAILABILITYWINDOW = "ignoreAvailabilityWindow"
|
|
61
|
-
private const val ERROR_DAI_NOT_ENABLED = "Google DAI support not enabled."
|
|
62
|
-
private const val ERROR_UNSUPPORTED_SSAI_INTEGRATION = "Unsupported SSAI integration"
|
|
63
|
-
private const val ERROR_MISSING_SSAI_INTEGRATION = "Missing SSAI integration"
|
|
64
54
|
private const val ERROR_IMA_NOT_ENABLED = "Google IMA support not enabled."
|
|
65
55
|
private const val ERROR_UNSUPPORTED_CSAI_INTEGRATION = "Unsupported CSAI integration"
|
|
66
56
|
private const val ERROR_MISSING_CSAI_INTEGRATION = "Missing CSAI integration"
|
|
67
57
|
|
|
58
|
+
private const val PROP_SSAI_INTEGRATION_GOOGLE_DAI = "google-dai"
|
|
59
|
+
|
|
68
60
|
class SourceAdapter {
|
|
69
61
|
private val gson = Gson()
|
|
70
62
|
|
|
63
|
+
companion object {
|
|
64
|
+
init {
|
|
65
|
+
// Register default SSAI adapter for Google DAI.
|
|
66
|
+
SSAIAdapterRegistry.register(PROP_SSAI_INTEGRATION_GOOGLE_DAI) { json, currentBuilder ->
|
|
67
|
+
googleDaiBuilderFromJson(currentBuilder, json)
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
71
72
|
@Throws(THEOplayerException::class)
|
|
72
73
|
fun parseSourceFromJS(source: ReadableMap?): SourceDescription? {
|
|
73
74
|
if (source == null) {
|
|
@@ -83,17 +84,11 @@ class SourceAdapter {
|
|
|
83
84
|
val jsonSources = jsonSourceObject.optJSONArray(PROP_SOURCES)
|
|
84
85
|
if (jsonSources != null) {
|
|
85
86
|
for (i in 0 until jsonSources.length()) {
|
|
86
|
-
|
|
87
|
-
if (typedSource != null) {
|
|
88
|
-
typedSources.add(typedSource)
|
|
89
|
-
}
|
|
87
|
+
typedSources.add(parseTypedSource(jsonSources[i] as JSONObject))
|
|
90
88
|
}
|
|
91
89
|
} else {
|
|
92
90
|
val jsonSource = jsonSourceObject.optJSONObject(PROP_SOURCES) ?: return null
|
|
93
|
-
|
|
94
|
-
if (typedSource != null) {
|
|
95
|
-
typedSources.add(typedSource)
|
|
96
|
-
}
|
|
91
|
+
typedSources.add(parseTypedSource(jsonSource))
|
|
97
92
|
}
|
|
98
93
|
|
|
99
94
|
// poster
|
|
@@ -142,48 +137,13 @@ class SourceAdapter {
|
|
|
142
137
|
}
|
|
143
138
|
|
|
144
139
|
@Throws(THEOplayerException::class)
|
|
145
|
-
private fun parseTypedSource(jsonTypedSource: JSONObject): TypedSource
|
|
140
|
+
private fun parseTypedSource(jsonTypedSource: JSONObject): TypedSource {
|
|
146
141
|
try {
|
|
147
142
|
var tsBuilder = TypedSource.Builder(jsonTypedSource.optString(PROP_SRC))
|
|
148
143
|
val sourceType = parseSourceType(jsonTypedSource)
|
|
149
144
|
if (jsonTypedSource.has(PROP_SSAI)) {
|
|
150
145
|
val ssaiJson = jsonTypedSource.getJSONObject(PROP_SSAI)
|
|
151
|
-
|
|
152
|
-
// Check for valid SsaiIntegration
|
|
153
|
-
val ssaiIntegrationStr = ssaiJson.optString(PROP_INTEGRATION)
|
|
154
|
-
if (!TextUtils.isEmpty(ssaiIntegrationStr)) {
|
|
155
|
-
val ssaiIntegration = SsaiIntegration.from(ssaiIntegrationStr)
|
|
156
|
-
?: throw THEOplayerException(
|
|
157
|
-
ErrorCode.AD_ERROR,
|
|
158
|
-
"$ERROR_UNSUPPORTED_SSAI_INTEGRATION: $ssaiIntegrationStr"
|
|
159
|
-
)
|
|
160
|
-
when (ssaiIntegration) {
|
|
161
|
-
SsaiIntegration.GOOGLE_DAI -> {
|
|
162
|
-
if (!BuildConfig.EXTENSION_GOOGLE_DAI) {
|
|
163
|
-
throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_DAI_NOT_ENABLED)
|
|
164
|
-
}
|
|
165
|
-
tsBuilder = if (ssaiJson.optString(PROP_AVAILABILITY_TYPE) == "vod") {
|
|
166
|
-
GoogleDaiTypedSource.Builder(
|
|
167
|
-
gson.fromJson(ssaiJson.toString(), GoogleDaiVodConfiguration::class.java)
|
|
168
|
-
)
|
|
169
|
-
} else {
|
|
170
|
-
GoogleDaiTypedSource.Builder(
|
|
171
|
-
gson.fromJson(ssaiJson.toString(), GoogleDaiLiveConfiguration::class.java)
|
|
172
|
-
)
|
|
173
|
-
}
|
|
174
|
-
// Prefer DASH if not SSAI type specified
|
|
175
|
-
if (sourceType == null) {
|
|
176
|
-
tsBuilder.type(SourceType.DASH)
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
else -> throw THEOplayerException(
|
|
180
|
-
ErrorCode.AD_ERROR,
|
|
181
|
-
"$ERROR_UNSUPPORTED_SSAI_INTEGRATION: $ssaiIntegrationStr"
|
|
182
|
-
)
|
|
183
|
-
}
|
|
184
|
-
} else {
|
|
185
|
-
throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_MISSING_SSAI_INTEGRATION)
|
|
186
|
-
}
|
|
146
|
+
tsBuilder = SSAIAdapterRegistry.typedSourceBuilderFromJson(ssaiJson, tsBuilder, sourceType)
|
|
187
147
|
}
|
|
188
148
|
if (sourceType != null) {
|
|
189
149
|
tsBuilder.type(sourceType)
|
|
@@ -216,10 +176,13 @@ class SourceAdapter {
|
|
|
216
176
|
}
|
|
217
177
|
}
|
|
218
178
|
return tsBuilder.build()
|
|
219
|
-
} catch (e:
|
|
220
|
-
|
|
179
|
+
} catch (e: THEOplayerException) {
|
|
180
|
+
// Rethrow THEOplayerException
|
|
181
|
+
throw e
|
|
182
|
+
} catch (e: Exception) {
|
|
183
|
+
// Wrap exception
|
|
184
|
+
throw THEOplayerException(ErrorCode.SOURCE_INVALID, "Invalid source: ${e.message}")
|
|
221
185
|
}
|
|
222
|
-
return null
|
|
223
186
|
}
|
|
224
187
|
|
|
225
188
|
@Throws(THEOplayerException::class)
|
|
@@ -281,12 +244,14 @@ class SourceAdapter {
|
|
|
281
244
|
AdIntegrationKind.GOOGLE_IMA -> parseImaAdFromJS(
|
|
282
245
|
jsonAdDescription
|
|
283
246
|
)
|
|
247
|
+
|
|
284
248
|
AdIntegrationKind.DEFAULT -> {
|
|
285
249
|
throw THEOplayerException(
|
|
286
250
|
ErrorCode.AD_ERROR,
|
|
287
251
|
"$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationKindStr"
|
|
288
252
|
)
|
|
289
253
|
}
|
|
254
|
+
|
|
290
255
|
else -> {
|
|
291
256
|
throw THEOplayerException(
|
|
292
257
|
ErrorCode.AD_ERROR,
|
|
@@ -14,17 +14,6 @@ Object.keys(_Ads).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var _FreeWheelAdDescription = require("./FreeWheelAdDescription");
|
|
18
|
-
Object.keys(_FreeWheelAdDescription).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _FreeWheelAdDescription[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _FreeWheelAdDescription[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
17
|
var _IMAAdDescription = require("./IMAAdDescription");
|
|
29
18
|
Object.keys(_IMAAdDescription).forEach(function (key) {
|
|
30
19
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -36,17 +25,6 @@ Object.keys(_IMAAdDescription).forEach(function (key) {
|
|
|
36
25
|
}
|
|
37
26
|
});
|
|
38
27
|
});
|
|
39
|
-
var _SpotXAdDescription = require("./SpotXAdDescription");
|
|
40
|
-
Object.keys(_SpotXAdDescription).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _SpotXAdDescription[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _SpotXAdDescription[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
28
|
var _THEOplayerAdDescription = require("./THEOplayerAdDescription");
|
|
51
29
|
Object.keys(_THEOplayerAdDescription).forEach(function (key) {
|
|
52
30
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Ads","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","
|
|
1
|
+
{"version":3,"names":["_Ads","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_IMAAdDescription","_THEOplayerAdDescription","_barrel"],"sourceRoot":"../../../../../src","sources":["api/source/ads/barrel.ts"],"mappings":";;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,IAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,IAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,IAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,iBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,iBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,iBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,iBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,wBAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,wBAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,wBAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,wBAAA,CAAAN,GAAA;IAAA;EAAA;AAAA;AACA,IAAAO,OAAA,GAAAX,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAS,OAAA,EAAAR,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAO,OAAA,CAAAP,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAG,OAAA,CAAAP,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -14,17 +14,6 @@ Object.keys(_GoogleDAIConfiguration).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
-
var _ImagineServerSideAdInsertionConfiguration = require("./ImagineServerSideAdInsertionConfiguration");
|
|
18
|
-
Object.keys(_ImagineServerSideAdInsertionConfiguration).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _ImagineServerSideAdInsertionConfiguration[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _ImagineServerSideAdInsertionConfiguration[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
17
|
var _ServerSideAdInsertionConfiguration = require("./ServerSideAdInsertionConfiguration");
|
|
29
18
|
Object.keys(_ServerSideAdInsertionConfiguration).forEach(function (key) {
|
|
30
19
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -36,15 +25,4 @@ Object.keys(_ServerSideAdInsertionConfiguration).forEach(function (key) {
|
|
|
36
25
|
}
|
|
37
26
|
});
|
|
38
27
|
});
|
|
39
|
-
var _YospaceServerSideAdInsertionConfiguration = require("./YospaceServerSideAdInsertionConfiguration");
|
|
40
|
-
Object.keys(_YospaceServerSideAdInsertionConfiguration).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _YospaceServerSideAdInsertionConfiguration[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _YospaceServerSideAdInsertionConfiguration[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
28
|
//# sourceMappingURL=barrel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_GoogleDAIConfiguration","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","
|
|
1
|
+
{"version":3,"names":["_GoogleDAIConfiguration","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_ServerSideAdInsertionConfiguration"],"sourceRoot":"../../../../../../src","sources":["api/source/ads/ssai/barrel.ts"],"mappings":";;;;;AAAA,IAAAA,uBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,uBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,uBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,uBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,mCAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,mCAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,mCAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,mCAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -75,8 +75,9 @@ class THEOplayerView extends _react.PureComponent {
|
|
|
75
75
|
version,
|
|
76
76
|
state
|
|
77
77
|
} = event.nativeEvent;
|
|
78
|
-
this._facade.initializeFromNativePlayer_(version, state)
|
|
79
|
-
|
|
78
|
+
this._facade.initializeFromNativePlayer_(version, state).then(() => {
|
|
79
|
+
this.props.onPlayerReady?.(this._facade);
|
|
80
|
+
});
|
|
80
81
|
};
|
|
81
82
|
_onSourceChange = () => {
|
|
82
83
|
this.reset();
|