react-native-theoplayer 11.0.0 → 11.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.
- package/CHANGELOG.md +18 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/theoplayer/PlayerConfigAdapter.kt +5 -0
- package/android/src/main/java/com/theoplayer/ads/AdsModule.kt +1 -1
- package/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +35 -31
- package/ios/.editorconfig +7 -0
- package/ios/THEOplayerRCTBridge.m +1 -1
- package/ios/THEOplayerRCTPlayerAPI.swift +32 -6
- package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +30 -14
- package/ios/ads/THEOplayerRCTSourceDescriptionBuilder+Ads.swift +31 -4
- package/ios/contentprotection/THEOplayerRCTContentProtectionAggregator.swift +10 -0
- package/ios/theoAds/THEOplayerRCTSourceDescriptionBuilder+TheoAds.swift +7 -2
- package/lib/commonjs/api/source/ads/Ads.js +5 -0
- package/lib/commonjs/api/source/ads/Ads.js.map +1 -1
- package/lib/commonjs/api/source/ads/TheoAdDescription.js.map +1 -1
- package/lib/commonjs/internal/adapter/theolive/TheoLiveWebAdapter.js +2 -11
- package/lib/commonjs/internal/adapter/theolive/TheoLiveWebAdapter.js.map +1 -1
- package/lib/commonjs/manifest.json +1 -1
- package/lib/module/api/source/ads/Ads.js +6 -0
- package/lib/module/api/source/ads/Ads.js.map +1 -1
- package/lib/module/api/source/ads/TheoAdDescription.js.map +1 -1
- package/lib/module/internal/adapter/theolive/TheoLiveWebAdapter.js +2 -11
- package/lib/module/internal/adapter/theolive/TheoLiveWebAdapter.js.map +1 -1
- package/lib/module/manifest.json +1 -1
- package/lib/typescript/api/ads/Ad.d.ts +5 -7
- package/lib/typescript/api/ads/Ad.d.ts.map +1 -1
- package/lib/typescript/api/ads/AdBreak.d.ts +4 -6
- package/lib/typescript/api/ads/AdBreak.d.ts.map +1 -1
- package/lib/typescript/api/config/PlayerConfiguration.d.ts +11 -0
- package/lib/typescript/api/config/PlayerConfiguration.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/Ads.d.ts +10 -5
- package/lib/typescript/api/source/ads/Ads.d.ts.map +1 -1
- package/lib/typescript/api/source/ads/TheoAdDescription.d.ts +7 -0
- package/lib/typescript/api/source/ads/TheoAdDescription.d.ts.map +1 -1
- package/lib/typescript/internal/adapter/theolive/TheoLiveWebAdapter.d.ts.map +1 -1
- package/package.json +3 -3
- package/react-native-theoplayer.podspec +7 -7
- package/src/api/ads/Ad.ts +5 -7
- package/src/api/ads/AdBreak.ts +4 -6
- package/src/api/config/PlayerConfiguration.ts +12 -0
- package/src/api/source/ads/Ads.ts +11 -5
- package/src/api/source/ads/TheoAdDescription.ts +8 -0
- package/src/internal/adapter/theolive/TheoLiveWebAdapter.ts +2 -11
- package/src/manifest.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,24 @@ 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
|
+
## [11.2.0] - 26-06-04
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added support for `CustomAdIntegrationKind`, allowing custom ad integrations on top of the player API.
|
|
13
|
+
- Added support for `breakManifestUrl` for OptiView Ads streams.
|
|
14
|
+
|
|
15
|
+
## [11.1.0] - 26-05-27
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Added `useSystemCaptionStyle` flag to `PlayerConfiguration` on Android. When set to `true`, the player will apply the caption styles as configured in the system settings.
|
|
20
|
+
- Added support on iOS for controlling the targetQualities on THEOlive streams.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fixed an issue where on iOS the contentProtection queryParameters were not converted to string values, resulting in missing parameters in the urls.
|
|
25
|
+
|
|
8
26
|
## [11.0.0] - 26-04-16
|
|
9
27
|
|
|
10
28
|
### Added
|
package/android/build.gradle
CHANGED
|
@@ -126,8 +126,8 @@ repositories {
|
|
|
126
126
|
mavenLocal()
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
// The minimum supported THEOplayer version is 11.
|
|
130
|
-
def theoVersion = safeExtGet('THEOplayer_sdk', '[11.
|
|
129
|
+
// The minimum supported THEOplayer version is 11.4.0
|
|
130
|
+
def theoVersion = safeExtGet('THEOplayer_sdk', '[11.4.0, 12.0.0)')
|
|
131
131
|
def theoMediaSessionVersion = safeExtGet('THEOplayer_mediasession', '[11.0.0, 12.0.0)')
|
|
132
132
|
def theoAdsWrapperVersion = "11.0.0"
|
|
133
133
|
def coroutinesVersion = safeExtGet('coroutinesVersion', '1.10.2')
|
|
@@ -44,6 +44,8 @@ private const val PROP_THEOLIVE_ANALYTICS_DISABLED = "analyticsDisabled"
|
|
|
44
44
|
private const val PROP_THEOLIVE_DISCOVERY_URL = "discoveryUrl"
|
|
45
45
|
private const val PROP_MULTIMEDIA_TUNNELING_ENABLED = "tunnelingEnabled"
|
|
46
46
|
private const val PROP_DEBUG_LOGS_ENABLED = "debugLogsEnabled"
|
|
47
|
+
private const val PROP_SYSTEM_CAPTION_STYLE = "useSystemCaptionStyle"
|
|
48
|
+
|
|
47
49
|
|
|
48
50
|
class PlayerConfigAdapter(private val configProps: ReadableMap?) {
|
|
49
51
|
|
|
@@ -83,6 +85,9 @@ class PlayerConfigAdapter(private val configProps: ReadableMap?) {
|
|
|
83
85
|
if (hasKey(PROP_MULTIMEDIA_TUNNELING_ENABLED)) {
|
|
84
86
|
tunnelingEnabled(getBoolean(PROP_MULTIMEDIA_TUNNELING_ENABLED))
|
|
85
87
|
}
|
|
88
|
+
if (hasKey(PROP_SYSTEM_CAPTION_STYLE)) {
|
|
89
|
+
useSystemCaptionStyle(getBoolean(PROP_SYSTEM_CAPTION_STYLE))
|
|
90
|
+
}
|
|
86
91
|
}
|
|
87
92
|
}.build()
|
|
88
93
|
}
|
|
@@ -45,7 +45,7 @@ class AdsModule(context: ReactApplicationContext) : ReactContextBaseJavaModule(c
|
|
|
45
45
|
fun schedule(tag: Int, ad: ReadableMap) {
|
|
46
46
|
viewResolver.resolveViewByTag(tag) { view: ReactTHEOplayerView? ->
|
|
47
47
|
try {
|
|
48
|
-
view?.adsApi?.schedule(sourceHelper.
|
|
48
|
+
view?.adsApi?.schedule(sourceHelper.parseAdDescriptionFromJS(ad))
|
|
49
49
|
} catch (exception: THEOplayerException) {
|
|
50
50
|
Log.e(NAME, exception.message ?: ERR_SCHEDULE_AD)
|
|
51
51
|
}
|
|
@@ -23,6 +23,7 @@ import com.theoplayer.android.api.ads.theoads.TheoAdsLayoutOverride
|
|
|
23
23
|
import com.theoplayer.android.api.cmcd.CMCDTransmissionMode
|
|
24
24
|
import com.theoplayer.android.api.error.ErrorCode
|
|
25
25
|
import com.theoplayer.android.api.source.AdIntegration
|
|
26
|
+
import com.theoplayer.android.api.source.addescription.CustomAdDescriptionRegistry
|
|
26
27
|
import com.theoplayer.android.api.source.dash.DashPlaybackConfiguration
|
|
27
28
|
import com.theoplayer.android.api.theolive.PlayoutDelay
|
|
28
29
|
import com.theoplayer.android.api.theolive.TheoLiveSource
|
|
@@ -73,6 +74,7 @@ private const val PROP_RETRIEVE_POD_ID_URI = "retrievePodIdURI"
|
|
|
73
74
|
private const val PROP_INITIALIZATION_DELAY = "initializationDelay"
|
|
74
75
|
private const val PROP_SSE_ENDPOINT = "sseEndpoint"
|
|
75
76
|
private const val PROP_STREAM_ACTIVITY_MONITOR_ID = "streamActivityMonitorId"
|
|
77
|
+
private const val PROP_BREAK_MANIFEST_URL = "breakManifestUrl"
|
|
76
78
|
private const val PROP_LATENCY_CONFIGURATION = "latencyConfiguration"
|
|
77
79
|
private const val PROP_PROFILE = "profile"
|
|
78
80
|
private const val PROP_WEBRTC: String = "webrtc"
|
|
@@ -82,8 +84,8 @@ private const val PROP_PLAYOUT_DELAY_MAX: String = "maximum"
|
|
|
82
84
|
|
|
83
85
|
private const val ERROR_IMA_NOT_ENABLED = "Google IMA support not enabled."
|
|
84
86
|
private const val ERROR_THEOADS_NOT_ENABLED = "THEOads support not enabled."
|
|
85
|
-
private const val
|
|
86
|
-
private const val
|
|
87
|
+
private const val ERROR_UNSUPPORTED_AD_INTEGRATION = "Unsupported Ad integration"
|
|
88
|
+
private const val ERROR_MISSING_AD_INTEGRATION = "Missing Ad integration"
|
|
87
89
|
|
|
88
90
|
private const val PROP_SSAI_INTEGRATION_GOOGLE_DAI = "google-dai"
|
|
89
91
|
|
|
@@ -151,7 +153,9 @@ class SourceAdapter {
|
|
|
151
153
|
val jsonAdDescription = jsonAds[i] as JSONObject
|
|
152
154
|
|
|
153
155
|
// Currently only ima-ads are supported.
|
|
154
|
-
|
|
156
|
+
parseAdDescriptionFromJS(jsonAdDescription)?.let {
|
|
157
|
+
ads.add(it)
|
|
158
|
+
}
|
|
155
159
|
}
|
|
156
160
|
}
|
|
157
161
|
|
|
@@ -278,16 +282,6 @@ class SourceAdapter {
|
|
|
278
282
|
}
|
|
279
283
|
}
|
|
280
284
|
|
|
281
|
-
@Throws(THEOplayerException::class)
|
|
282
|
-
fun parseAdFromJS(map: ReadableMap): AdDescription? {
|
|
283
|
-
return try {
|
|
284
|
-
parseAdFromJS(JSONObject(gson.toJson(map.toHashMap())))
|
|
285
|
-
} catch (e: JSONException) {
|
|
286
|
-
e.printStackTrace()
|
|
287
|
-
null
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
285
|
private fun parseSourceType(jsonTypedSource: JSONObject): SourceType? {
|
|
292
286
|
val type = jsonTypedSource.optString(PROP_TYPE)
|
|
293
287
|
if (type.isNotEmpty()) {
|
|
@@ -308,30 +302,39 @@ class SourceAdapter {
|
|
|
308
302
|
return null
|
|
309
303
|
}
|
|
310
304
|
|
|
305
|
+
@Throws(THEOplayerException::class)
|
|
306
|
+
fun parseAdDescriptionFromJS(map: ReadableMap): AdDescription? {
|
|
307
|
+
return try {
|
|
308
|
+
parseAdDescriptionFromJS(JSONObject(gson.toJson(map.toHashMap())))
|
|
309
|
+
} catch (e: JSONException) {
|
|
310
|
+
e.printStackTrace()
|
|
311
|
+
null
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
311
315
|
@Throws(JSONException::class, THEOplayerException::class)
|
|
312
|
-
fun
|
|
316
|
+
fun parseAdDescriptionFromJS(jsonAdDescription: JSONObject): AdDescription? {
|
|
313
317
|
val integrationStr = jsonAdDescription.optString(PROP_INTEGRATION)
|
|
314
318
|
return if (!TextUtils.isEmpty(integrationStr)) {
|
|
315
319
|
when (integrationStr) {
|
|
316
|
-
AdIntegration.GOOGLE_IMA.adIntegration ->
|
|
317
|
-
AdIntegration.THEO_ADS.adIntegration ->
|
|
318
|
-
else ->
|
|
319
|
-
throw THEOplayerException(
|
|
320
|
+
AdIntegration.GOOGLE_IMA.adIntegration -> parseImaAdDescriptionFromJS(jsonAdDescription)
|
|
321
|
+
AdIntegration.THEO_ADS.adIntegration -> parseTheoAdDescriptionFromJS(jsonAdDescription)
|
|
322
|
+
else ->
|
|
323
|
+
CustomAdDescriptionRegistry.deserialize(integrationStr, jsonAdDescription.toString()) ?: throw THEOplayerException(
|
|
320
324
|
ErrorCode.AD_ERROR,
|
|
321
|
-
"$
|
|
325
|
+
"$ERROR_UNSUPPORTED_AD_INTEGRATION: $integrationStr"
|
|
322
326
|
)
|
|
323
|
-
}
|
|
324
327
|
}
|
|
325
328
|
} else {
|
|
326
329
|
throw THEOplayerException(
|
|
327
330
|
ErrorCode.AD_ERROR,
|
|
328
|
-
"$
|
|
331
|
+
"$ERROR_MISSING_AD_INTEGRATION: $integrationStr"
|
|
329
332
|
)
|
|
330
333
|
}
|
|
331
334
|
}
|
|
332
335
|
|
|
333
336
|
@Throws(THEOplayerException::class)
|
|
334
|
-
private fun
|
|
337
|
+
private fun parseImaAdDescriptionFromJS(jsonAdDescription: JSONObject): GoogleImaAdDescription {
|
|
335
338
|
if (!BuildConfig.EXTENSION_GOOGLE_IMA) {
|
|
336
339
|
throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_IMA_NOT_ENABLED)
|
|
337
340
|
}
|
|
@@ -349,7 +352,7 @@ class SourceAdapter {
|
|
|
349
352
|
}
|
|
350
353
|
|
|
351
354
|
@Throws(JSONException::class)
|
|
352
|
-
private fun
|
|
355
|
+
private fun parseTheoAdDescriptionFromJS(jsonAdDescription: JSONObject): TheoAdDescription {
|
|
353
356
|
if (!BuildConfig.EXTENSION_THEOADS) {
|
|
354
357
|
throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_THEOADS_NOT_ENABLED)
|
|
355
358
|
}
|
|
@@ -366,6 +369,7 @@ class SourceAdapter {
|
|
|
366
369
|
initializationDelay = jsonAdDescription.optDouble(PROP_INITIALIZATION_DELAY).takeIf { it.isFinite() },
|
|
367
370
|
sseEndpoint = jsonAdDescription.optString(PROP_SSE_ENDPOINT).takeIf { it.isNotEmpty() },
|
|
368
371
|
streamActivityMonitorId = jsonAdDescription.optString(PROP_STREAM_ACTIVITY_MONITOR_ID).takeIf { it.isNotEmpty() },
|
|
372
|
+
breakManifestUrl = jsonAdDescription.optString(PROP_BREAK_MANIFEST_URL).takeIf { it.isNotEmpty() },
|
|
369
373
|
)
|
|
370
374
|
}
|
|
371
375
|
|
|
@@ -376,9 +380,9 @@ class SourceAdapter {
|
|
|
376
380
|
|
|
377
381
|
private fun parseOverrideLayout(override: String?): TheoAdsLayoutOverride? {
|
|
378
382
|
return when (override) {
|
|
379
|
-
"single", "single-if-mobile" ->
|
|
380
|
-
"l-shape" ->
|
|
381
|
-
"double" ->
|
|
383
|
+
"single", "single-if-mobile" -> TheoAdsLayoutOverride.SINGLE
|
|
384
|
+
"l-shape" -> TheoAdsLayoutOverride.LSHAPE
|
|
385
|
+
"double" -> TheoAdsLayoutOverride.DOUBLE
|
|
382
386
|
else -> null
|
|
383
387
|
}
|
|
384
388
|
}
|
|
@@ -395,11 +399,11 @@ class SourceAdapter {
|
|
|
395
399
|
|
|
396
400
|
private fun parseTextTrackKind(kind: String?): TextTrackKind? {
|
|
397
401
|
return when (kind) {
|
|
398
|
-
"subtitles" ->
|
|
399
|
-
"metadata" ->
|
|
400
|
-
"captions" ->
|
|
401
|
-
"chapters" ->
|
|
402
|
-
"descriptions" ->
|
|
402
|
+
"subtitles" -> TextTrackKind.SUBTITLES
|
|
403
|
+
"metadata" -> TextTrackKind.METADATA
|
|
404
|
+
"captions" -> TextTrackKind.CAPTIONS
|
|
405
|
+
"chapters" -> TextTrackKind.CHAPTERS
|
|
406
|
+
"descriptions" -> TextTrackKind.DESCRIPTIONS
|
|
403
407
|
else -> null
|
|
404
408
|
}
|
|
405
409
|
}
|
|
@@ -113,7 +113,7 @@ RCT_EXTERN_METHOD(setSelectedVideoTrack:(nonnull NSNumber *)node
|
|
|
113
113
|
uid:(nonnull NSNumber *)uid)
|
|
114
114
|
|
|
115
115
|
RCT_EXTERN_METHOD(setTargetVideoQuality:(nonnull NSNumber *)node
|
|
116
|
-
|
|
116
|
+
uids:(nonnull NSArray<NSNumber *> *)uids)
|
|
117
117
|
|
|
118
118
|
RCT_EXTERN_METHOD(setPreload:(nonnull NSNumber *)node
|
|
119
119
|
type:(nonnull NSString *)type)
|
|
@@ -10,8 +10,6 @@ import THEOplayerSDK
|
|
|
10
10
|
import THEOplayerConnectorSideloadedSubtitle
|
|
11
11
|
#endif
|
|
12
12
|
|
|
13
|
-
let ERROR_MESSAGE_PLAYER_QUALITY_UNSUPPORTED_FEATURE: String = "Setting a target video quality is not supported on iOS/tvOS."
|
|
14
|
-
|
|
15
13
|
let TTS_PROP_BACKGROUND_COLOR = "backgroundColor"
|
|
16
14
|
let TTS_PROP_EDGE_STYLE = "edgeStyle"
|
|
17
15
|
let TTS_PROP_FONT_COLOR = "fontColor"
|
|
@@ -337,10 +335,38 @@ class THEOplayerRCTPlayerAPI: NSObject, RCTBridgeModule {
|
|
|
337
335
|
}
|
|
338
336
|
}
|
|
339
337
|
|
|
340
|
-
@objc(setTargetVideoQuality:
|
|
341
|
-
func setTargetVideoQuality(_ node: NSNumber,
|
|
342
|
-
|
|
343
|
-
|
|
338
|
+
@objc(setTargetVideoQuality:uids:)
|
|
339
|
+
func setTargetVideoQuality(_ node: NSNumber, uids: [NSNumber]) -> Void {
|
|
340
|
+
DispatchQueue.main.async {
|
|
341
|
+
if let theView = self.bridge.uiManager.view(forReactTag: node) as? THEOplayerRCTView,
|
|
342
|
+
let player = theView.player {
|
|
343
|
+
let videoTracks: VideoTrackList = player.videoTracks
|
|
344
|
+
guard videoTracks.count > 0 else {
|
|
345
|
+
return
|
|
346
|
+
}
|
|
347
|
+
var activeVideoTrack: VideoTrack?
|
|
348
|
+
for i in 0...videoTracks.count-1 {
|
|
349
|
+
let videoTrack: MediaTrack = videoTracks.get(i)
|
|
350
|
+
if videoTrack.enabled {
|
|
351
|
+
activeVideoTrack = videoTrack as? VideoTrack
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
if let foundTrack = activeVideoTrack {
|
|
355
|
+
let matchingQualities = (0..<foundTrack.qualities.count).compactMap { index in
|
|
356
|
+
let quality = foundTrack.qualities.get(index)
|
|
357
|
+
return uids.contains { $0.intValue == quality.bandwidth } ? quality : nil
|
|
358
|
+
}
|
|
359
|
+
foundTrack.targetQualities = matchingQualities.count > 0 ? matchingQualities : nil
|
|
360
|
+
if DEBUG_PLAYER_API {
|
|
361
|
+
if matchingQualities.count > 0 {
|
|
362
|
+
if DEBUG_PLAYER_API { PrintUtils.printLog(logText: "[NATIVE] targetQualities: \(uids) set on active videotrack. (matching: \(matchingQualities.map(\.bandwidth)))") }
|
|
363
|
+
} else {
|
|
364
|
+
if DEBUG_PLAYER_API { PrintUtils.printLog(logText: "[NATIVE] targetQualities: \(uids) set on active videotrack. (no match or empty) => no quality restriction.") }
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
344
370
|
}
|
|
345
371
|
|
|
346
372
|
@objc(setPreload:type:)
|
|
@@ -62,6 +62,7 @@ let SD_PROP_USE_ID3: String = "useId3"
|
|
|
62
62
|
let SD_PROP_RETRIEVE_POD_ID_URI: String = "retrievePodIdURI"
|
|
63
63
|
let SD_PROP_INITIALIZATION_DELAY: String = "initializationDelay"
|
|
64
64
|
let SD_PROP_HLS_DATE_RANGE: String = "hlsDateRange"
|
|
65
|
+
let SD_PROP_BREAK_MANIFEST_URL: String = "breakManifestUrl"
|
|
65
66
|
let SD_PROP_CMCD: String = "cmcd"
|
|
66
67
|
let SD_PROP_QUERY_PARAMETERS: String = "queryParameters"
|
|
67
68
|
|
|
@@ -90,7 +91,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
90
91
|
guard let sourcesData = sourceData[SD_PROP_SOURCES] else {
|
|
91
92
|
return (nil, nil)
|
|
92
93
|
}
|
|
93
|
-
|
|
94
|
+
|
|
94
95
|
#if os(iOS)
|
|
95
96
|
if let metadataData = sourceData[SD_PROP_METADATA] as? [String:Any],
|
|
96
97
|
let cachingTaskId = metadataData[SD_PROP_METADATA_CACHINGTASK_ID] as? String {
|
|
@@ -164,7 +165,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
164
165
|
if let metadataData = sourceData[SD_PROP_METADATA] as? [String:Any] {
|
|
165
166
|
metadataDescription = THEOplayerRCTSourceDescriptionBuilder.buildMetaDataDescription(metadataData)
|
|
166
167
|
}
|
|
167
|
-
|
|
168
|
+
|
|
168
169
|
// 6. configure CMCD
|
|
169
170
|
let cmcd = sourceData[SD_PROP_CMCD] as? [String:Any]
|
|
170
171
|
if cmcd != nil {
|
|
@@ -179,7 +180,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
179
180
|
ads: adsDescriptions,
|
|
180
181
|
poster: poster,
|
|
181
182
|
metadata: metadataDescription)
|
|
182
|
-
|
|
183
|
+
|
|
183
184
|
return (sourceDescription, metadataAndChapterTrackDescriptions)
|
|
184
185
|
}
|
|
185
186
|
|
|
@@ -193,7 +194,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
193
194
|
let contentProtection = extractDrmConfiguration(from: typedSourceData)
|
|
194
195
|
let integration = typedSourceData[SD_PROP_INTEGRATION] as? String
|
|
195
196
|
let type = typedSourceData[SD_PROP_TYPE] as? String
|
|
196
|
-
|
|
197
|
+
|
|
197
198
|
if integration == "theolive" || type == "theolive" {
|
|
198
199
|
return THEOplayerRCTSourceDescriptionBuilder.buildTHEOliveDescription(typedSourceData, contentProtection: contentProtection)
|
|
199
200
|
}
|
|
@@ -247,7 +248,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
247
248
|
let textTrackFormat = THEOplayerRCTSourceDescriptionBuilder.extractTextTrackFormat(textTracksData[SD_PROP_FORMAT] as? String)
|
|
248
249
|
let textTrackPTS = textTracksData[SD_PROP_PTS] as? String
|
|
249
250
|
let textTrackLocalTime = textTracksData[SD_PROP_LOCALTIME] as? String ?? "00:00:00.000"
|
|
250
|
-
|
|
251
|
+
|
|
251
252
|
#if canImport(THEOplayerConnectorSideloadedSubtitle)
|
|
252
253
|
let ttDescription = SSTextTrackDescription(src: textTrackSrc,
|
|
253
254
|
srclang: textTrackSrcLang,
|
|
@@ -345,7 +346,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
345
346
|
*/
|
|
346
347
|
static func buildContentProtection(_ contentProtectionData: [String:Any]) -> MultiplatformDRMConfiguration? {
|
|
347
348
|
let customIntegrationId = contentProtectionData[SD_PROP_INTEGRATION] as? String ?? "internal"
|
|
348
|
-
|
|
349
|
+
|
|
349
350
|
// fairplay
|
|
350
351
|
var fairplayKeySystem: THEOplayerSDK.KeySystemConfiguration? = nil
|
|
351
352
|
if let fairplayData = contentProtectionData[SD_PROP_FAIRPLAY] as? [String:Any] {
|
|
@@ -357,8 +358,13 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
357
358
|
let licenseAcquisitionURL = fairplayData[SD_PROP_LICENSE_URL] as? String
|
|
358
359
|
let headers = fairplayData[SD_PROP_HEADERS] as? [String:String]
|
|
359
360
|
let licenseType = fairplayData[SD_PROP_LICENSE_TYPE] as? String
|
|
360
|
-
|
|
361
|
-
|
|
361
|
+
var queryParameters: [String: String] = [:]
|
|
362
|
+
if let allQueryParams = fairplayData[SD_PROP_QUERY_PARAMETERS] as? [String:Any] {
|
|
363
|
+
for (key, value) in allQueryParams {
|
|
364
|
+
queryParameters[key] = "\(value)"
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
362
368
|
fairplayKeySystem = KeySystemConfiguration(
|
|
363
369
|
licenseAcquisitionURL: licenseAcquisitionURL,
|
|
364
370
|
certificateURL: certificateUrl,
|
|
@@ -367,7 +373,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
367
373
|
queryParameters: queryParameters
|
|
368
374
|
)
|
|
369
375
|
}
|
|
370
|
-
|
|
376
|
+
|
|
371
377
|
// widevine
|
|
372
378
|
var widevineKeySystem: THEOplayerSDK.KeySystemConfiguration? = nil
|
|
373
379
|
if let widevineData = contentProtectionData[SD_PROP_WIDEVINE] as? [String:Any] {
|
|
@@ -379,8 +385,13 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
379
385
|
let licenseAcquisitionURL = widevineData[SD_PROP_LICENSE_URL] as? String
|
|
380
386
|
let headers = widevineData[SD_PROP_HEADERS] as? [String:String]
|
|
381
387
|
let licenseType = widevineData[SD_PROP_LICENSE_TYPE] as? String
|
|
382
|
-
|
|
383
|
-
|
|
388
|
+
var queryParameters: [String: String] = [:]
|
|
389
|
+
if let allQueryParams = widevineData[SD_PROP_QUERY_PARAMETERS] as? [String:Any] {
|
|
390
|
+
for (key, value) in allQueryParams {
|
|
391
|
+
queryParameters[key] = "\(value)"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
384
395
|
widevineKeySystem = KeySystemConfiguration(
|
|
385
396
|
licenseAcquisitionURL: licenseAcquisitionURL,
|
|
386
397
|
certificateURL: certificateUrl,
|
|
@@ -389,11 +400,16 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
389
400
|
queryParameters: queryParameters
|
|
390
401
|
)
|
|
391
402
|
}
|
|
392
|
-
|
|
403
|
+
|
|
393
404
|
// global query parameters
|
|
394
|
-
|
|
405
|
+
var queryParameters: [String: String] = [:]
|
|
406
|
+
if let allQueryParams = contentProtectionData[SD_PROP_QUERY_PARAMETERS] as? [String:Any] {
|
|
407
|
+
for (key, value) in allQueryParams {
|
|
408
|
+
queryParameters[key] = "\(value)"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
395
411
|
let integrationParameters = contentProtectionData[SD_PROP_INTEGRATION_PARAMETERS] as? [String:Any] ?? [:]
|
|
396
|
-
|
|
412
|
+
|
|
397
413
|
return MultiplatformDRMConfiguration(
|
|
398
414
|
customIntegrationId: customIntegrationId,
|
|
399
415
|
integrationParameters: integrationParameters,
|
|
@@ -6,6 +6,17 @@ import UIKit
|
|
|
6
6
|
|
|
7
7
|
let SD_PROP_ADS: String = "ads"
|
|
8
8
|
|
|
9
|
+
public class CustomAdDescription: AdDescription {
|
|
10
|
+
public let integration: THEOplayerSDK.AdIntegration? = AdIntegration.none
|
|
11
|
+
public let customIntegrationId: String
|
|
12
|
+
public let integrationData: [String: Any]
|
|
13
|
+
|
|
14
|
+
public init(customIntegrationId: String, integrationData: [String: Any] = [:]) {
|
|
15
|
+
self.customIntegrationId = customIntegrationId
|
|
16
|
+
self.integrationData = integrationData
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
9
20
|
extension THEOplayerRCTSourceDescriptionBuilder {
|
|
10
21
|
|
|
11
22
|
/**
|
|
@@ -24,11 +35,16 @@ extension THEOplayerRCTSourceDescriptionBuilder {
|
|
|
24
35
|
adsDescriptions?.append(adDescription)
|
|
25
36
|
} else {
|
|
26
37
|
if DEBUG_SOURCE_DESCRIPTION_BUILDER {
|
|
27
|
-
PrintUtils.printLog(logText: "[NATIVE] Could not create
|
|
38
|
+
PrintUtils.printLog(logText: "[NATIVE] Could not create AdDescription from adsData")
|
|
28
39
|
}
|
|
29
|
-
return nil
|
|
30
40
|
}
|
|
31
41
|
}
|
|
42
|
+
if adsDescriptions?.isEmpty == true {
|
|
43
|
+
if DEBUG_SOURCE_DESCRIPTION_BUILDER {
|
|
44
|
+
PrintUtils.printLog(logText: "[NATIVE] Could not create any AdDescription from adsData array")
|
|
45
|
+
}
|
|
46
|
+
return nil
|
|
47
|
+
}
|
|
32
48
|
}
|
|
33
49
|
// case: single ads object
|
|
34
50
|
else if let adsData = ads as? [String:Any] {
|
|
@@ -36,7 +52,7 @@ extension THEOplayerRCTSourceDescriptionBuilder {
|
|
|
36
52
|
adsDescriptions?.append(adDescription)
|
|
37
53
|
} else {
|
|
38
54
|
if DEBUG_SOURCE_DESCRIPTION_BUILDER {
|
|
39
|
-
PrintUtils.printLog(logText: "[NATIVE] Could not create
|
|
55
|
+
PrintUtils.printLog(logText: "[NATIVE] Could not create AdDescription from adsData")
|
|
40
56
|
}
|
|
41
57
|
return nil
|
|
42
58
|
}
|
|
@@ -58,11 +74,22 @@ extension THEOplayerRCTSourceDescriptionBuilder {
|
|
|
58
74
|
case "theoads":
|
|
59
75
|
return THEOplayerRCTSourceDescriptionBuilder.buildSingleTHEOadsDescription(adsData)
|
|
60
76
|
default:
|
|
61
|
-
|
|
77
|
+
return THEOplayerRCTSourceDescriptionBuilder.buildSingleCustomAdsDescription(adsData)
|
|
62
78
|
}
|
|
63
79
|
}
|
|
64
80
|
return nil
|
|
65
81
|
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
Creates a THEOplayer AdDescription, containing all passed properties.
|
|
85
|
+
- returns: a THEOplayer AdDescription
|
|
86
|
+
*/
|
|
87
|
+
static func buildSingleCustomAdsDescription(_ adsData: [String:Any]) -> AdDescription? {
|
|
88
|
+
if let integration = adsData[SD_PROP_INTEGRATION] as? String {
|
|
89
|
+
return CustomAdDescription(customIntegrationId: integration, integrationData: adsData)
|
|
90
|
+
}
|
|
91
|
+
return nil
|
|
92
|
+
}
|
|
66
93
|
|
|
67
94
|
/**
|
|
68
95
|
Creates a THEOplayer GoogleImaAdDescription. This requires an ads property in the RN source description.
|
|
@@ -17,6 +17,7 @@ let DRM_PROP_WIDEVINE: String = "widevine"
|
|
|
17
17
|
let DRM_PROP_LICENSE_URL: String = "licenseAcquisitionURL"
|
|
18
18
|
let DRM_PROP_CERTIFICATE_URL: String = "certificateURL"
|
|
19
19
|
let DRM_PROP_BASE64_BODY: String = "base64body"
|
|
20
|
+
let DRM_PROP_QUERY_PARAMETERS: String = "queryParameters"
|
|
20
21
|
let DRM_PROP_FAIRPLAY_SKD_URL: String = "fairplaySkdUrl"
|
|
21
22
|
let DRM_PROP_STATUS: String = "status"
|
|
22
23
|
let DRM_PROP_STATUS_TEXT: String = "statusText"
|
|
@@ -32,6 +33,9 @@ class THEOplayerRCTContentProtectionAggregator {
|
|
|
32
33
|
var aggregatedDrmConfig: [String:Any] = [:]
|
|
33
34
|
aggregatedDrmConfig[DRM_PROP_INTEGRATION] = drmConfig.customIntegrationId ?? "unknown"
|
|
34
35
|
aggregatedDrmConfig[DRM_PROP_INTEGRATION_PARAMS] = drmConfig.integrationParameters
|
|
36
|
+
if let queryParameters = drmConfig.queryParameters {
|
|
37
|
+
aggregatedDrmConfig[DRM_PROP_QUERY_PARAMETERS] = queryParameters
|
|
38
|
+
}
|
|
35
39
|
if let multiDrmConfigCollection = drmConfig as? THEOplayerSDK.MultiplatformDRMConfiguration {
|
|
36
40
|
let keySystemConfigurations: THEOplayerSDK.KeySystemConfigurationCollection = multiDrmConfigCollection.keySystemConfigurations
|
|
37
41
|
if let fairplayConfig: THEOplayerSDK.KeySystemConfiguration = keySystemConfigurations.fairplay {
|
|
@@ -114,6 +118,12 @@ class THEOplayerRCTContentProtectionAggregator {
|
|
|
114
118
|
if let certificateURL = keySystemConfig.certificateURL?.absoluteString {
|
|
115
119
|
aggregatedKeySystem[DRM_PROP_CERTIFICATE_URL] = certificateURL
|
|
116
120
|
}
|
|
121
|
+
if let headers = keySystemConfig.headers {
|
|
122
|
+
aggregatedKeySystem[DRM_PROP_HEADERS] = headers
|
|
123
|
+
}
|
|
124
|
+
if let queryParameters = keySystemConfig.queryParameters {
|
|
125
|
+
aggregatedKeySystem[DRM_PROP_QUERY_PARAMETERS] = queryParameters
|
|
126
|
+
}
|
|
117
127
|
return aggregatedKeySystem
|
|
118
128
|
}
|
|
119
129
|
}
|
|
@@ -50,7 +50,11 @@ extension THEOplayerRCTSourceDescriptionBuilder {
|
|
|
50
50
|
let streamActivityMonitorId = adsData[SD_PROP_STREAM_ACTIVITY_MONITOR_ID_THEOADS] as? String
|
|
51
51
|
let retrievePodIdURI = adsData[SD_PROP_RETRIEVE_POD_ID_URI] as? String
|
|
52
52
|
let initializationDelay = adsData[SD_PROP_INITIALIZATION_DELAY] as? Double
|
|
53
|
-
|
|
53
|
+
var breakManifestUrl: URL?
|
|
54
|
+
if let breakManifestUrlString = adsData[SD_PROP_BREAK_MANIFEST_URL] as? String {
|
|
55
|
+
breakManifestUrl = URL(string: breakManifestUrlString)
|
|
56
|
+
}
|
|
57
|
+
|
|
54
58
|
return THEOAdDescription(networkCode: networkCode,
|
|
55
59
|
customAssetKey: customAssetKey,
|
|
56
60
|
backdropDoubleBox: backdropDoubleBox,
|
|
@@ -62,7 +66,8 @@ extension THEOplayerRCTSourceDescriptionBuilder {
|
|
|
62
66
|
streamActivityMonitorId: streamActivityMonitorId,
|
|
63
67
|
sseEndpoint: sseEndpoint,
|
|
64
68
|
retrievePodIdURI: retrievePodIdURI,
|
|
65
|
-
initializationDelay: initializationDelay
|
|
69
|
+
initializationDelay: initializationDelay,
|
|
70
|
+
breakManifestUrl: breakManifestUrl)
|
|
66
71
|
#else
|
|
67
72
|
return nil
|
|
68
73
|
#endif
|
|
@@ -56,4 +56,9 @@ let AdIntegrationKind = exports.AdIntegrationKind = /*#__PURE__*/function (AdInt
|
|
|
56
56
|
AdIntegrationKind["theoads"] = "theoads";
|
|
57
57
|
return AdIntegrationKind;
|
|
58
58
|
}({});
|
|
59
|
+
/**
|
|
60
|
+
* The identifier of a custom ad integration.
|
|
61
|
+
*
|
|
62
|
+
* @category Ads
|
|
63
|
+
*/
|
|
59
64
|
//# sourceMappingURL=Ads.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AdIntegrationKind","exports"],"sourceRoot":"../../../../../src","sources":["api/source/ads/Ads.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":["AdIntegrationKind","exports"],"sourceRoot":"../../../../../src","sources":["api/source/ads/Ads.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AAkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAfA,IAgBYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAS7B;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TheoAdsLayoutOverride","exports"],"sourceRoot":"../../../../../src","sources":["api/source/ads/TheoAdDescription.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"names":["TheoAdsLayoutOverride","exports"],"sourceRoot":"../../../../../src","sources":["api/source/ads/TheoAdDescription.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA6GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA,IAUYA,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA","ignoreList":[]}
|
|
@@ -13,17 +13,8 @@ class TheoLiveWebAdapter {
|
|
|
13
13
|
return currentLatency ? Promise.resolve(currentLatency) : Promise.reject('latency not available');
|
|
14
14
|
}
|
|
15
15
|
get latencies() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
return Promise.resolve({
|
|
19
|
-
engineLatency: webLatencies?.engine,
|
|
20
|
-
distributionLatency: webLatencies?.distribution,
|
|
21
|
-
playerLatency: webLatencies?.player,
|
|
22
|
-
theoliveLatency: webLatencies?.theolive
|
|
23
|
-
});
|
|
24
|
-
} else {
|
|
25
|
-
return Promise.reject('latencies not available');
|
|
26
|
-
}
|
|
16
|
+
console.warn('The THEOlive latencies metrics are not available');
|
|
17
|
+
return Promise.resolve({});
|
|
27
18
|
}
|
|
28
19
|
set authToken(token) {
|
|
29
20
|
if (this._player.theoLive) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TheoLiveWebAdapter","constructor","_player","currentLatency","latency","Promise","resolve","reject","latencies","
|
|
1
|
+
{"version":3,"names":["TheoLiveWebAdapter","constructor","_player","currentLatency","latency","Promise","resolve","reject","latencies","console","warn","authToken","token","theoLive","exports"],"sourceRoot":"../../../../../src","sources":["internal/adapter/theolive/TheoLiveWebAdapter.ts"],"mappings":";;;;;;AAGO,MAAMA,kBAAkB,CAAwB;EACrDC,WAAWA,CAASC,OAAyB,EAAE;IAAA,KAA3BA,OAAyB,GAAzBA,OAAyB;EAAG;EAEhD,IAAIC,cAAcA,CAAA,EAAoB;IACpC,MAAMA,cAAc,GAAG,IAAI,CAACD,OAAO,CAACE,OAAO,CAACD,cAAc;IAC1D,OAAOA,cAAc,GAAGE,OAAO,CAACC,OAAO,CAACH,cAAc,CAAC,GAAGE,OAAO,CAACE,MAAM,CAAS,uBAAuB,CAAC;EAC3G;EAEA,IAAIC,SAASA,CAAA,EAA2B;IACtCC,OAAO,CAACC,IAAI,CAAC,kDAAkD,CAAC;IAChE,OAAOL,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC,CAAC;EAC5B;EAEA,IAAIK,SAASA,CAACC,KAAa,EAAE;IAC3B,IAAI,IAAI,CAACV,OAAO,CAACW,QAAQ,EAAE;MACzB,IAAI,CAACX,OAAO,CAACW,QAAQ,CAACF,SAAS,GAAGC,KAAK;IACzC;EACF;EAEA,IAAID,SAASA,CAAA,EAAuB;IAClC,OAAO,IAAI,CAACT,OAAO,CAACW,QAAQ,EAAEF,SAAS;EACzC;AACF;AAACG,OAAA,CAAAd,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"11.
|
|
1
|
+
{"version":"11.2.0","buildDate":"2026-06-04T15:04:43.174Z"}
|
|
@@ -55,4 +55,10 @@ export let AdIntegrationKind = /*#__PURE__*/function (AdIntegrationKind) {
|
|
|
55
55
|
AdIntegrationKind["theoads"] = "theoads";
|
|
56
56
|
return AdIntegrationKind;
|
|
57
57
|
}({});
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The identifier of a custom ad integration.
|
|
61
|
+
*
|
|
62
|
+
* @category Ads
|
|
63
|
+
*/
|
|
58
64
|
//# sourceMappingURL=Ads.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AdIntegrationKind"],"sourceRoot":"../../../../../src","sources":["api/source/ads/Ads.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["AdIntegrationKind"],"sourceRoot":"../../../../../src","sources":["api/source/ads/Ads.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;;AAS7B;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TheoAdsLayoutOverride"],"sourceRoot":"../../../../../src","sources":["api/source/ads/TheoAdDescription.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;
|
|
1
|
+
{"version":3,"names":["TheoAdsLayoutOverride"],"sourceRoot":"../../../../../src","sources":["api/source/ads/TheoAdDescription.ts"],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA6GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAYA,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA","ignoreList":[]}
|
|
@@ -9,17 +9,8 @@ export class TheoLiveWebAdapter {
|
|
|
9
9
|
return currentLatency ? Promise.resolve(currentLatency) : Promise.reject('latency not available');
|
|
10
10
|
}
|
|
11
11
|
get latencies() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return Promise.resolve({
|
|
15
|
-
engineLatency: webLatencies?.engine,
|
|
16
|
-
distributionLatency: webLatencies?.distribution,
|
|
17
|
-
playerLatency: webLatencies?.player,
|
|
18
|
-
theoliveLatency: webLatencies?.theolive
|
|
19
|
-
});
|
|
20
|
-
} else {
|
|
21
|
-
return Promise.reject('latencies not available');
|
|
22
|
-
}
|
|
12
|
+
console.warn('The THEOlive latencies metrics are not available');
|
|
13
|
+
return Promise.resolve({});
|
|
23
14
|
}
|
|
24
15
|
set authToken(token) {
|
|
25
16
|
if (this._player.theoLive) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TheoLiveWebAdapter","constructor","_player","currentLatency","latency","Promise","resolve","reject","latencies","
|
|
1
|
+
{"version":3,"names":["TheoLiveWebAdapter","constructor","_player","currentLatency","latency","Promise","resolve","reject","latencies","console","warn","authToken","token","theoLive"],"sourceRoot":"../../../../../src","sources":["internal/adapter/theolive/TheoLiveWebAdapter.ts"],"mappings":";;AAGA,OAAO,MAAMA,kBAAkB,CAAwB;EACrDC,WAAWA,CAASC,OAAyB,EAAE;IAAA,KAA3BA,OAAyB,GAAzBA,OAAyB;EAAG;EAEhD,IAAIC,cAAcA,CAAA,EAAoB;IACpC,MAAMA,cAAc,GAAG,IAAI,CAACD,OAAO,CAACE,OAAO,CAACD,cAAc;IAC1D,OAAOA,cAAc,GAAGE,OAAO,CAACC,OAAO,CAACH,cAAc,CAAC,GAAGE,OAAO,CAACE,MAAM,CAAS,uBAAuB,CAAC;EAC3G;EAEA,IAAIC,SAASA,CAAA,EAA2B;IACtCC,OAAO,CAACC,IAAI,CAAC,kDAAkD,CAAC;IAChE,OAAOL,OAAO,CAACC,OAAO,CAAC,CAAC,CAAC,CAAC;EAC5B;EAEA,IAAIK,SAASA,CAACC,KAAa,EAAE;IAC3B,IAAI,IAAI,CAACV,OAAO,CAACW,QAAQ,EAAE;MACzB,IAAI,CAACX,OAAO,CAACW,QAAQ,CAACF,SAAS,GAAGC,KAAK;IACzC;EACF;EAEA,IAAID,SAASA,CAAA,EAAuB;IAClC,OAAO,IAAI,CAACT,OAAO,CAACW,QAAQ,EAAEF,SAAS;EACzC;AACF","ignoreList":[]}
|
package/lib/module/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"11.
|
|
1
|
+
{"version":"11.2.0","buildDate":"2026-06-04T15:04:43.174Z"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AdBreak } from './AdBreak';
|
|
2
2
|
import type { CompanionAd } from 'theoplayer';
|
|
3
|
+
import { AdIntegrationKind, CustomAdIntegrationKind } from '../source/ads/Ads';
|
|
3
4
|
/**
|
|
4
5
|
* Represents a VAST creative. It is either a linear or non-linear ad.
|
|
5
6
|
*
|
|
@@ -15,15 +16,12 @@ export interface Ad {
|
|
|
15
16
|
*/
|
|
16
17
|
adSystem: string | undefined;
|
|
17
18
|
/**
|
|
18
|
-
* The integration of the ad, represented by a value from
|
|
19
|
-
*
|
|
20
|
-
* <br/> - `'google-ima'`
|
|
21
|
-
* <br/> - `'google-dai'`
|
|
22
|
-
* <br/> - `'freewheel'`
|
|
19
|
+
* The integration of the ad, represented by a value from {@link AdIntegrationKind}
|
|
20
|
+
* or {@link CustomAdIntegrationKind | the identifier of a custom integration}.
|
|
23
21
|
*
|
|
24
|
-
* @defaultValue `'
|
|
22
|
+
* @defaultValue `'csai'`
|
|
25
23
|
*/
|
|
26
|
-
integration?:
|
|
24
|
+
integration?: AdIntegrationKind | CustomAdIntegrationKind;
|
|
27
25
|
/**
|
|
28
26
|
* The type of the ad, represented by a value from the following list:
|
|
29
27
|
* <br/> - `'linear'`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ad.d.ts","sourceRoot":"","sources":["../../../../src/api/ads/Ad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Ad.d.ts","sourceRoot":"","sources":["../../../../src/api/ads/Ad.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,WAAW,EAAE;IACjB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,iBAAiB,GAAG,uBAAuB,CAAC;IAE1D;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;IAE1B;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B;;;;;OAKG;IACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;;;;OAMG;IACH,UAAU,EAAE,WAAW,EAAE,CAAC;IAE1B;;;;;;;;OAQG;IACH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;;;;OAKG;IACH,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;;;;OAKG;IACH,cAAc,EAAE,aAAa,EAAE,CAAC;CACjC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAY,SAAQ,EAAE;IACrC;;;;;OAKG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAE5B;;;;;OAKG;IACH,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjC;;;;;OAKG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,YAAY,GAAG,aAAa,GAAG,WAAW,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;IAEvB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAS,SAAQ,EAAE;IAClC;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
7
|
import type { Ad } from './Ad';
|
|
8
|
+
import { AdIntegrationKind, CustomAdIntegrationKind } from '../source/ads/Ads';
|
|
8
9
|
/**
|
|
9
10
|
* Represents an ad break in the VMAP specification or an ad pod in the VAST specification.
|
|
10
11
|
*
|
|
@@ -13,13 +14,10 @@ import type { Ad } from './Ad';
|
|
|
13
14
|
*/
|
|
14
15
|
export interface AdBreak {
|
|
15
16
|
/**
|
|
16
|
-
* The integration of the ad break, represented by a value from
|
|
17
|
-
*
|
|
18
|
-
* <br/> - `'google-ima'`
|
|
19
|
-
* <br/> - `'google-dai'`
|
|
20
|
-
* <br/> - `'freewheel'`
|
|
17
|
+
* The integration of the ad break, represented by a value from {@link AdIntegrationKind}
|
|
18
|
+
* or {@link CustomAdIntegrationKind | the identifier of a custom integration}.
|
|
21
19
|
*/
|
|
22
|
-
integration:
|
|
20
|
+
integration: AdIntegrationKind | CustomAdIntegrationKind | undefined;
|
|
23
21
|
/**
|
|
24
22
|
* List of ads which will be played sequentially at the ad break's time offset.
|
|
25
23
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdBreak.d.ts","sourceRoot":"","sources":["../../../../src/api/ads/AdBreak.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAE/
|
|
1
|
+
{"version":3,"file":"AdBreak.d.ts","sourceRoot":"","sources":["../../../../src/api/ads/AdBreak.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE/E;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,WAAW,EAAE,iBAAiB,GAAG,uBAAuB,GAAG,SAAS,CAAC;IAErE;;OAEG;IACH,GAAG,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC;IAEtB;;;;;;;OAOG;IACH,EAAE,EAAE,MAAM,GAAG,SAAS,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAEhC;;;;;;OAMG;IACH,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C"}
|
|
@@ -115,6 +115,17 @@ export interface PlayerConfiguration {
|
|
|
115
115
|
* <br/> - When set to true, all debug log tags from the native Android SDK will be enabled.
|
|
116
116
|
*/
|
|
117
117
|
debugLogsEnabled?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Sets whether captions should automatically apply a system-defined style.
|
|
120
|
+
*
|
|
121
|
+
* @defaultValue false
|
|
122
|
+
*
|
|
123
|
+
* @platform android
|
|
124
|
+
*
|
|
125
|
+
* @remarks
|
|
126
|
+
* <br/> - Any user-defined overrides are still respected.
|
|
127
|
+
*/
|
|
128
|
+
useSystemCaptionStyle?: boolean;
|
|
118
129
|
}
|
|
119
130
|
/**
|
|
120
131
|
* The muted autoplay policy of a player for web.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayerConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/api/config/PlayerConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAE3C;;OAEG;IACH,GAAG,CAAC,EAAE,gBAAgB,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAEzB;;OAEG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAEjD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"PlayerConfiguration.d.ts","sourceRoot":"","sources":["../../../../src/api/config/PlayerConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAE3C;;OAEG;IACH,GAAG,CAAC,EAAE,gBAAgB,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAEzB;;OAEG;IACH,EAAE,CAAC,EAAE,eAAe,CAAC;IAErB;;OAEG;IACH,YAAY,CAAC,EAAE,yBAAyB,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;OAIG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAEjD;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;;;;;OASG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC"}
|
|
@@ -41,19 +41,18 @@ export interface AdSource {
|
|
|
41
41
|
export interface AdDescription {
|
|
42
42
|
/**
|
|
43
43
|
* The integration of the ad break.
|
|
44
|
-
*
|
|
45
|
-
* @defaultValue `'csai'`
|
|
46
44
|
*/
|
|
47
|
-
integration?: AdIntegrationKind;
|
|
45
|
+
integration?: AdIntegrationKind | CustomAdIntegrationKind;
|
|
48
46
|
/**
|
|
49
47
|
* Whether the ad replaces playback of the content.
|
|
50
48
|
*
|
|
51
49
|
* @remarks
|
|
52
50
|
* <br/> - When the ad ends, the content will resume at the ad break's offset plus its duration.
|
|
51
|
+
* <br/> - Available for `theoads` since v11.2.0.
|
|
53
52
|
*
|
|
54
53
|
* @defaultValue
|
|
55
|
-
* <br/> - `true` for live content
|
|
56
|
-
* <br/> - `false` for VOD content
|
|
54
|
+
* <br/> - `true` for live content and `theoads` VOD content.
|
|
55
|
+
* <br/> - `false` for VOD content.
|
|
57
56
|
*/
|
|
58
57
|
replaceContent?: boolean;
|
|
59
58
|
/**
|
|
@@ -108,4 +107,10 @@ export declare enum AdIntegrationKind {
|
|
|
108
107
|
csai = "csai",
|
|
109
108
|
theoads = "theoads"
|
|
110
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* The identifier of a custom ad integration.
|
|
112
|
+
*
|
|
113
|
+
* @category Ads
|
|
114
|
+
*/
|
|
115
|
+
export type CustomAdIntegrationKind = string & {};
|
|
111
116
|
//# sourceMappingURL=Ads.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ads.d.ts","sourceRoot":"","sources":["../../../../../src/api/source/ads/Ads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B
|
|
1
|
+
{"version":3,"file":"Ads.d.ts","sourceRoot":"","sources":["../../../../../src/api/source/ads/Ads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;OAIG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,iBAAiB,GAAG,uBAAuB,CAAC;IAE1D;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAE5B;;;;;;;;;;;;;;;;OAgBG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,iBAAiB;IAC3B,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,OAAO,YAAY;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,EAAE,CAAC"}
|
|
@@ -94,6 +94,13 @@ export interface TheoAdDescription extends AdDescription {
|
|
|
94
94
|
* The amount of seconds we wait to initialize THEOads.
|
|
95
95
|
*/
|
|
96
96
|
initializationDelay?: number;
|
|
97
|
+
/**
|
|
98
|
+
* The URL of the break manifest.
|
|
99
|
+
*
|
|
100
|
+
* @remarks
|
|
101
|
+
* <br/> - The break manifest describes the upcoming ad breaks in the stream.
|
|
102
|
+
*/
|
|
103
|
+
breakManifestUrl?: string;
|
|
97
104
|
}
|
|
98
105
|
/**
|
|
99
106
|
* Describes how and when the layout of a THEOads ad break should be overridden:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheoAdDescription.d.ts","sourceRoot":"","sources":["../../../../../src/api/source/ads/TheoAdDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD;;OAEG;IACH,WAAW,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAEvC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TheoAdDescription.d.ts","sourceRoot":"","sources":["../../../../../src/api/source/ads/TheoAdDescription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD;;OAEG;IACH,WAAW,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAEvC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IAEvC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,MAAM,YAAY;IAClB,MAAM,WAAW;IACjB,gBAAgB,qBAAqB;CACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TheoLiveWebAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/internal/adapter/theolive/TheoLiveWebAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,qBAAa,kBAAmB,YAAW,WAAW;IACxC,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,gBAAgB;IAE7C,IAAI,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAGpC;IAED,IAAI,SAAS,IAAI,OAAO,CAAC,aAAa,CAAC,
|
|
1
|
+
{"version":3,"file":"TheoLiveWebAdapter.d.ts","sourceRoot":"","sources":["../../../../../src/internal/adapter/theolive/TheoLiveWebAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,qBAAa,kBAAmB,YAAW,WAAW;IACxC,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,gBAAgB;IAE7C,IAAI,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAGpC;IAED,IAAI,SAAS,IAAI,OAAO,CAAC,aAAa,CAAC,CAGtC;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,EAI1B;IAED,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-theoplayer",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "A THEOplayer video component for react-native.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"react": "^19.2.3",
|
|
71
71
|
"react-native": "^0.84.1",
|
|
72
72
|
"react-native-builder-bob": "^0.39.1",
|
|
73
|
-
"theoplayer": "^11.
|
|
73
|
+
"theoplayer": "^11.4.0",
|
|
74
74
|
"typedoc": "^0.25.13",
|
|
75
75
|
"typedoc-plugin-external-resolver": "^1.0.3",
|
|
76
76
|
"typedoc-plugin-mdn-links": "^3.3.4",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"react": "*",
|
|
82
82
|
"react-native": "*",
|
|
83
|
-
"theoplayer": "^11"
|
|
83
|
+
"theoplayer": "^11.4.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependenciesMeta": {
|
|
86
86
|
"theoplayer": {
|
|
@@ -43,37 +43,37 @@ Pod::Spec.new do |s|
|
|
|
43
43
|
|
|
44
44
|
# THEOplayer Dependency
|
|
45
45
|
puts "Adding THEOplayerSDK-core"
|
|
46
|
-
s.dependency "THEOplayerSDK-core", "~> 11.
|
|
46
|
+
s.dependency "THEOplayerSDK-core", "~> 11.4"
|
|
47
47
|
|
|
48
48
|
# THEOlive Dependency
|
|
49
49
|
puts "Adding THEOplayer-Integration-THEOlive"
|
|
50
|
-
s.dependency "THEOplayer-Integration-THEOlive", "~> 11.
|
|
50
|
+
s.dependency "THEOplayer-Integration-THEOlive", "~> 11.4"
|
|
51
51
|
|
|
52
52
|
# Feature based integration dependencies
|
|
53
53
|
if theofeatures.include?("GOOGLE_IMA")
|
|
54
54
|
puts "Adding THEOplayer-Integration-GoogleIMA"
|
|
55
|
-
s.dependency "THEOplayer-Integration-GoogleIMA", "~> 11.
|
|
55
|
+
s.dependency "THEOplayer-Integration-GoogleIMA", "~> 11.4"
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
if theofeatures.include?("CHROMECAST")
|
|
59
59
|
puts "Adding THEOplayer-Integration-GoogleCast"
|
|
60
|
-
s.ios.dependency "THEOplayer-Integration-GoogleCast", "~> 11.
|
|
60
|
+
s.ios.dependency "THEOplayer-Integration-GoogleCast", "~> 11.4"
|
|
61
61
|
end
|
|
62
62
|
|
|
63
63
|
if theofeatures.include?("THEO_ADS")
|
|
64
64
|
puts "Adding THEOplayer-Integration-THEOads"
|
|
65
|
-
s.dependency "THEOplayer-Integration-THEOads", "~> 11.
|
|
65
|
+
s.dependency "THEOplayer-Integration-THEOads", "~> 11.4"
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
if theofeatures.include?("MILLICAST")
|
|
69
69
|
puts "Adding THEOplayer-Integration-Millicast"
|
|
70
|
-
s.dependency "THEOplayer-Integration-Millicast", "~> 11.
|
|
70
|
+
s.dependency "THEOplayer-Integration-Millicast", "~> 11.4"
|
|
71
71
|
end
|
|
72
72
|
|
|
73
73
|
# Feature based connector dependencies
|
|
74
74
|
if theofeatures.include?("SIDELOADED_TEXTTRACKS")
|
|
75
75
|
puts "Adding THEOplayer-Connector-SideloadedSubtitle"
|
|
76
|
-
s.dependency "THEOplayer-Connector-SideloadedSubtitle", "~> 11.0"
|
|
76
|
+
s.dependency "THEOplayer-Connector-SideloadedSubtitle", "~> 11.0", "> 11.0.1"
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
end
|
package/src/api/ads/Ad.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AdBreak } from './AdBreak';
|
|
2
2
|
import type { CompanionAd } from 'theoplayer';
|
|
3
|
+
import { AdIntegrationKind, CustomAdIntegrationKind } from '../source/ads/Ads';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Represents a VAST creative. It is either a linear or non-linear ad.
|
|
@@ -17,15 +18,12 @@ export interface Ad {
|
|
|
17
18
|
adSystem: string | undefined;
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
|
-
* The integration of the ad, represented by a value from
|
|
21
|
-
*
|
|
22
|
-
* <br/> - `'google-ima'`
|
|
23
|
-
* <br/> - `'google-dai'`
|
|
24
|
-
* <br/> - `'freewheel'`
|
|
21
|
+
* The integration of the ad, represented by a value from {@link AdIntegrationKind}
|
|
22
|
+
* or {@link CustomAdIntegrationKind | the identifier of a custom integration}.
|
|
25
23
|
*
|
|
26
|
-
* @defaultValue `'
|
|
24
|
+
* @defaultValue `'csai'`
|
|
27
25
|
*/
|
|
28
|
-
integration?:
|
|
26
|
+
integration?: AdIntegrationKind | CustomAdIntegrationKind;
|
|
29
27
|
|
|
30
28
|
/**
|
|
31
29
|
* The type of the ad, represented by a value from the following list:
|
package/src/api/ads/AdBreak.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
7
|
import type { Ad } from './Ad';
|
|
8
|
+
import { AdIntegrationKind, CustomAdIntegrationKind } from '../source/ads/Ads';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Represents an ad break in the VMAP specification or an ad pod in the VAST specification.
|
|
@@ -14,13 +15,10 @@ import type { Ad } from './Ad';
|
|
|
14
15
|
*/
|
|
15
16
|
export interface AdBreak {
|
|
16
17
|
/**
|
|
17
|
-
* The integration of the ad break, represented by a value from
|
|
18
|
-
*
|
|
19
|
-
* <br/> - `'google-ima'`
|
|
20
|
-
* <br/> - `'google-dai'`
|
|
21
|
-
* <br/> - `'freewheel'`
|
|
18
|
+
* The integration of the ad break, represented by a value from {@link AdIntegrationKind}
|
|
19
|
+
* or {@link CustomAdIntegrationKind | the identifier of a custom integration}.
|
|
22
20
|
*/
|
|
23
|
-
integration:
|
|
21
|
+
integration: AdIntegrationKind | CustomAdIntegrationKind | undefined;
|
|
24
22
|
|
|
25
23
|
/**
|
|
26
24
|
* List of ads which will be played sequentially at the ad break's time offset.
|
|
@@ -130,6 +130,18 @@ export interface PlayerConfiguration {
|
|
|
130
130
|
* <br/> - When set to true, all debug log tags from the native Android SDK will be enabled.
|
|
131
131
|
*/
|
|
132
132
|
debugLogsEnabled?: boolean;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Sets whether captions should automatically apply a system-defined style.
|
|
136
|
+
*
|
|
137
|
+
* @defaultValue false
|
|
138
|
+
*
|
|
139
|
+
* @platform android
|
|
140
|
+
*
|
|
141
|
+
* @remarks
|
|
142
|
+
* <br/> - Any user-defined overrides are still respected.
|
|
143
|
+
*/
|
|
144
|
+
useSystemCaptionStyle?: boolean;
|
|
133
145
|
}
|
|
134
146
|
|
|
135
147
|
/**
|
|
@@ -44,20 +44,19 @@ export interface AdSource {
|
|
|
44
44
|
export interface AdDescription {
|
|
45
45
|
/**
|
|
46
46
|
* The integration of the ad break.
|
|
47
|
-
*
|
|
48
|
-
* @defaultValue `'csai'`
|
|
49
47
|
*/
|
|
50
|
-
integration?: AdIntegrationKind;
|
|
48
|
+
integration?: AdIntegrationKind | CustomAdIntegrationKind;
|
|
51
49
|
|
|
52
50
|
/**
|
|
53
51
|
* Whether the ad replaces playback of the content.
|
|
54
52
|
*
|
|
55
53
|
* @remarks
|
|
56
54
|
* <br/> - When the ad ends, the content will resume at the ad break's offset plus its duration.
|
|
55
|
+
* <br/> - Available for `theoads` since v11.2.0.
|
|
57
56
|
*
|
|
58
57
|
* @defaultValue
|
|
59
|
-
* <br/> - `true` for live content
|
|
60
|
-
* <br/> - `false` for VOD content
|
|
58
|
+
* <br/> - `true` for live content and `theoads` VOD content.
|
|
59
|
+
* <br/> - `false` for VOD content.
|
|
61
60
|
*/
|
|
62
61
|
replaceContent?: boolean;
|
|
63
62
|
|
|
@@ -115,3 +114,10 @@ export enum AdIntegrationKind {
|
|
|
115
114
|
csai = 'csai',
|
|
116
115
|
theoads = 'theoads',
|
|
117
116
|
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The identifier of a custom ad integration.
|
|
120
|
+
*
|
|
121
|
+
* @category Ads
|
|
122
|
+
*/
|
|
123
|
+
export type CustomAdIntegrationKind = string & {};
|
|
@@ -107,6 +107,14 @@ export interface TheoAdDescription extends AdDescription {
|
|
|
107
107
|
* The amount of seconds we wait to initialize THEOads.
|
|
108
108
|
*/
|
|
109
109
|
initializationDelay?: number;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* The URL of the break manifest.
|
|
113
|
+
*
|
|
114
|
+
* @remarks
|
|
115
|
+
* <br/> - The break manifest describes the upcoming ad breaks in the stream.
|
|
116
|
+
*/
|
|
117
|
+
breakManifestUrl?: string;
|
|
110
118
|
}
|
|
111
119
|
|
|
112
120
|
/**
|
|
@@ -10,17 +10,8 @@ export class TheoLiveWebAdapter implements TheoLiveAPI {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
get latencies(): Promise<HespLatencies> {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return Promise.resolve({
|
|
16
|
-
engineLatency: webLatencies?.engine,
|
|
17
|
-
distributionLatency: webLatencies?.distribution,
|
|
18
|
-
playerLatency: webLatencies?.player,
|
|
19
|
-
theoliveLatency: webLatencies?.theolive,
|
|
20
|
-
});
|
|
21
|
-
} else {
|
|
22
|
-
return Promise.reject<HespLatencies>('latencies not available');
|
|
23
|
-
}
|
|
13
|
+
console.warn('The THEOlive latencies metrics are not available');
|
|
14
|
+
return Promise.resolve({});
|
|
24
15
|
}
|
|
25
16
|
|
|
26
17
|
set authToken(token: string) {
|
package/src/manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"11.
|
|
1
|
+
{"version":"11.2.0","buildDate":"2026-06-04T15:04:43.174Z"}
|