react-native-theoplayer 11.1.0 → 11.2.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/android/build.gradle +2 -2
- 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/THEOplayerRCTPlayerAPI.swift +34 -12
- package/ios/THEOplayerRCTSourceDescriptionBuilder.swift +12 -11
- package/ios/THEOplayerRCTTrackMetadataAggregator.swift +32 -16
- package/ios/ads/THEOplayerRCTSourceDescriptionBuilder+Ads.swift +31 -4
- 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/source/ads/Ads.d.ts +7 -3
- 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/source/ads/Ads.ts +8 -3
- 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,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
|
+
## [11.2.1] - 26-06-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Fixed an issue on iOS where setting the targetVideoQuality uids was causing a crash due to an unsafe bounds-check.
|
|
13
|
+
|
|
14
|
+
## [11.2.0] - 26-06-04
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Added support for `CustomAdIntegrationKind`, allowing custom ad integrations on top of the player API.
|
|
19
|
+
- Added support for `breakManifestUrl` for OptiView Ads streams.
|
|
20
|
+
|
|
8
21
|
## [11.1.0] - 26-05-27
|
|
9
22
|
|
|
10
23
|
### 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')
|
|
@@ -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
|
}
|
|
@@ -281,11 +281,13 @@ class THEOplayerRCTPlayerAPI: NSObject, RCTBridgeModule {
|
|
|
281
281
|
let player = theView.player {
|
|
282
282
|
let uidValue = uid.intValue
|
|
283
283
|
let textTracks: TextTrackList = player.textTracks
|
|
284
|
-
|
|
284
|
+
let textTrackCount = textTracks.count
|
|
285
|
+
guard textTrackCount > 0 else {
|
|
285
286
|
return
|
|
286
287
|
}
|
|
287
288
|
if DEBUG_PLAYER_API { PrintUtils.printLog(logText: "[NATIVE] Showing textTrack \(uidValue) on TheoPlayer") }
|
|
288
|
-
for i in 0
|
|
289
|
+
for i in 0..<textTrackCount {
|
|
290
|
+
guard i < textTracks.count else { break }
|
|
289
291
|
let textTrack: TextTrack = textTracks.get(i)
|
|
290
292
|
if textTrack.uid == uidValue {
|
|
291
293
|
textTrack.mode = TextTrackMode.showing
|
|
@@ -304,11 +306,13 @@ class THEOplayerRCTPlayerAPI: NSObject, RCTBridgeModule {
|
|
|
304
306
|
let player = theView.player {
|
|
305
307
|
let uidValue = uid.intValue
|
|
306
308
|
let audioTracks: AudioTrackList = player.audioTracks
|
|
307
|
-
|
|
309
|
+
let audioTrackCount = audioTracks.count
|
|
310
|
+
guard audioTrackCount > 0 else {
|
|
308
311
|
return
|
|
309
312
|
}
|
|
310
313
|
if DEBUG_PLAYER_API { PrintUtils.printLog(logText: "[NATIVE] Enabling audioTrack \(uidValue) on TheoPlayer") }
|
|
311
|
-
for i in 0
|
|
314
|
+
for i in 0..<audioTrackCount {
|
|
315
|
+
guard i < audioTracks.count else { break }
|
|
312
316
|
let audioTrack: MediaTrack = audioTracks.get(i)
|
|
313
317
|
audioTrack.enabled = (audioTrack.uid == uidValue)
|
|
314
318
|
}
|
|
@@ -323,11 +327,13 @@ class THEOplayerRCTPlayerAPI: NSObject, RCTBridgeModule {
|
|
|
323
327
|
let player = theView.player {
|
|
324
328
|
let uidValue = uid.intValue
|
|
325
329
|
let videoTracks: VideoTrackList = player.videoTracks
|
|
326
|
-
|
|
330
|
+
let videoTrackCount = videoTracks.count
|
|
331
|
+
guard videoTrackCount > 0 else {
|
|
327
332
|
return
|
|
328
333
|
}
|
|
329
334
|
if DEBUG_PLAYER_API { PrintUtils.printLog(logText: "[NATIVE] Enabling videoTrack \(uidValue) on TheoPlayer") }
|
|
330
|
-
for i in 0
|
|
335
|
+
for i in 0..<videoTrackCount {
|
|
336
|
+
guard i < videoTracks.count else { break }
|
|
331
337
|
let videoTrack: MediaTrack = videoTracks.get(i)
|
|
332
338
|
videoTrack.enabled = (videoTrack.uid == uidValue)
|
|
333
339
|
}
|
|
@@ -341,23 +347,39 @@ class THEOplayerRCTPlayerAPI: NSObject, RCTBridgeModule {
|
|
|
341
347
|
if let theView = self.bridge.uiManager.view(forReactTag: node) as? THEOplayerRCTView,
|
|
342
348
|
let player = theView.player {
|
|
343
349
|
let videoTracks: VideoTrackList = player.videoTracks
|
|
344
|
-
|
|
350
|
+
let videoTrackCount = videoTracks.count
|
|
351
|
+
guard videoTrackCount > 0 else {
|
|
345
352
|
return
|
|
346
353
|
}
|
|
347
354
|
var activeVideoTrack: VideoTrack?
|
|
348
|
-
for i in 0
|
|
355
|
+
for i in 0..<videoTrackCount {
|
|
356
|
+
guard i < videoTracks.count else { break }
|
|
349
357
|
let videoTrack: MediaTrack = videoTracks.get(i)
|
|
350
358
|
if videoTrack.enabled {
|
|
351
359
|
activeVideoTrack = videoTrack as? VideoTrack
|
|
352
360
|
}
|
|
353
361
|
}
|
|
354
362
|
if let foundTrack = activeVideoTrack {
|
|
355
|
-
let
|
|
363
|
+
let requestedBandwidths = Set(uids.map { $0.intValue })
|
|
364
|
+
let currentBandwidths = Set(foundTrack.targetQualities?.map { $0.bandwidth } ?? [])
|
|
365
|
+
guard requestedBandwidths != currentBandwidths else {
|
|
366
|
+
if DEBUG_PLAYER_API { PrintUtils.printLog(logText: "[NATIVE] targetQualities: \(uids) already set on active videotrack. Skipping update.") }
|
|
367
|
+
return
|
|
368
|
+
}
|
|
369
|
+
let qualityCount = foundTrack.qualities.count
|
|
370
|
+
let matchingQualities = (0..<qualityCount).compactMap { index -> Quality? in
|
|
371
|
+
guard index < foundTrack.qualities.count else { return nil }
|
|
356
372
|
let quality = foundTrack.qualities.get(index)
|
|
357
|
-
return uids.contains { $0.intValue == quality.bandwidth } ? quality : nil
|
|
373
|
+
return uids.contains(where: { $0.intValue == quality.bandwidth }) ? quality : nil
|
|
374
|
+
}
|
|
375
|
+
foundTrack.targetQualities = matchingQualities.isEmpty ? nil : matchingQualities
|
|
376
|
+
if DEBUG_PLAYER_API {
|
|
377
|
+
if matchingQualities.count > 0 {
|
|
378
|
+
PrintUtils.printLog(logText: "[NATIVE] targetQualities: \(uids) set on active videotrack. (matching: \(matchingQualities.map(\.bandwidth)))")
|
|
379
|
+
} else {
|
|
380
|
+
PrintUtils.printLog(logText: "[NATIVE] targetQualities: \(uids) set on active videotrack. (no match or empty) => no quality restriction.")
|
|
381
|
+
}
|
|
358
382
|
}
|
|
359
|
-
foundTrack.targetQualities = matchingQualities
|
|
360
|
-
if DEBUG_PLAYER_API { PrintUtils.printLog(logText: "[NATIVE] targetQualities: \(uids) set on active videotrack.") }
|
|
361
383
|
}
|
|
362
384
|
}
|
|
363
385
|
}
|
|
@@ -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] {
|
|
@@ -363,7 +364,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
363
364
|
queryParameters[key] = "\(value)"
|
|
364
365
|
}
|
|
365
366
|
}
|
|
366
|
-
|
|
367
|
+
|
|
367
368
|
fairplayKeySystem = KeySystemConfiguration(
|
|
368
369
|
licenseAcquisitionURL: licenseAcquisitionURL,
|
|
369
370
|
certificateURL: certificateUrl,
|
|
@@ -372,7 +373,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
372
373
|
queryParameters: queryParameters
|
|
373
374
|
)
|
|
374
375
|
}
|
|
375
|
-
|
|
376
|
+
|
|
376
377
|
// widevine
|
|
377
378
|
var widevineKeySystem: THEOplayerSDK.KeySystemConfiguration? = nil
|
|
378
379
|
if let widevineData = contentProtectionData[SD_PROP_WIDEVINE] as? [String:Any] {
|
|
@@ -390,7 +391,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
390
391
|
queryParameters[key] = "\(value)"
|
|
391
392
|
}
|
|
392
393
|
}
|
|
393
|
-
|
|
394
|
+
|
|
394
395
|
widevineKeySystem = KeySystemConfiguration(
|
|
395
396
|
licenseAcquisitionURL: licenseAcquisitionURL,
|
|
396
397
|
certificateURL: certificateUrl,
|
|
@@ -399,7 +400,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
399
400
|
queryParameters: queryParameters
|
|
400
401
|
)
|
|
401
402
|
}
|
|
402
|
-
|
|
403
|
+
|
|
403
404
|
// global query parameters
|
|
404
405
|
var queryParameters: [String: String] = [:]
|
|
405
406
|
if let allQueryParams = contentProtectionData[SD_PROP_QUERY_PARAMETERS] as? [String:Any] {
|
|
@@ -408,7 +409,7 @@ class THEOplayerRCTSourceDescriptionBuilder {
|
|
|
408
409
|
}
|
|
409
410
|
}
|
|
410
411
|
let integrationParameters = contentProtectionData[SD_PROP_INTEGRATION_PARAMETERS] as? [String:Any] ?? [:]
|
|
411
|
-
|
|
412
|
+
|
|
412
413
|
return MultiplatformDRMConfiguration(
|
|
413
414
|
customIntegrationId: customIntegrationId,
|
|
414
415
|
integrationParameters: integrationParameters,
|
|
@@ -56,10 +56,12 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
56
56
|
// MARK: TEXTTRACKS
|
|
57
57
|
class func aggregatedTextTrackListInfo(textTracks: TextTrackList, metadataTracks: [[String:Any]], player: THEOplayer) -> [[String:Any]] {
|
|
58
58
|
var trackEntries:[[String:Any]] = metadataTracks
|
|
59
|
-
|
|
59
|
+
let textTrackCount = textTracks.count
|
|
60
|
+
guard textTrackCount > 0 else {
|
|
60
61
|
return trackEntries
|
|
61
62
|
}
|
|
62
|
-
for i in 0
|
|
63
|
+
for i in 0..<textTrackCount {
|
|
64
|
+
guard i < textTracks.count else { break }
|
|
63
65
|
let textTrack: TextTrack = textTracks.get(i)
|
|
64
66
|
trackEntries.append(THEOplayerRCTTrackMetadataAggregator.aggregatedTextTrackInfo(textTrack: textTrack, player: player))
|
|
65
67
|
}
|
|
@@ -90,10 +92,12 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
90
92
|
}
|
|
91
93
|
|
|
92
94
|
private class func selectedTextTrack(textTracks: TextTrackList) -> Int {
|
|
93
|
-
|
|
95
|
+
let textTrackCount = textTracks.count
|
|
96
|
+
guard textTrackCount > 0 else {
|
|
94
97
|
return 0
|
|
95
98
|
}
|
|
96
|
-
for i in 0
|
|
99
|
+
for i in 0..<textTrackCount {
|
|
100
|
+
guard i < textTracks.count else { break }
|
|
97
101
|
let textTrack: TextTrack = textTracks.get(i)
|
|
98
102
|
if textTrack.mode == TextTrackMode.showing {
|
|
99
103
|
return textTrack.uid
|
|
@@ -160,10 +164,12 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
160
164
|
// MARK: AUDIOTRACKS
|
|
161
165
|
private class func aggregatedAudioTrackListInfo(audioTracks: AudioTrackList) -> [[String:Any]] {
|
|
162
166
|
var audioTrackEntries:[[String:Any]] = []
|
|
163
|
-
|
|
167
|
+
let audioTrackCount = audioTracks.count
|
|
168
|
+
guard audioTrackCount > 0 else {
|
|
164
169
|
return audioTrackEntries
|
|
165
170
|
}
|
|
166
|
-
for i in 0
|
|
171
|
+
for i in 0..<audioTrackCount {
|
|
172
|
+
guard i < audioTracks.count else { break }
|
|
167
173
|
let audioTrack: MediaTrack = audioTracks.get(i) // should be casted to AudioTrack
|
|
168
174
|
audioTrackEntries.append(THEOplayerRCTTrackMetadataAggregator.aggregatedAudioTrackInfo(audioTrack: audioTrack))
|
|
169
175
|
}
|
|
@@ -181,7 +187,9 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
181
187
|
entry[PROP_ENABLED] = audioTrack.enabled
|
|
182
188
|
|
|
183
189
|
// add known qualities
|
|
184
|
-
|
|
190
|
+
let audioQualityCount = audioTrack.qualities.count
|
|
191
|
+
entry[PROP_QUALITIES] = (0..<audioQualityCount).compactMap { index -> [String:Any]? in
|
|
192
|
+
guard index < audioTrack.qualities.count else { return nil }
|
|
185
193
|
return THEOplayerRCTTrackMetadataAggregator.aggregatedQualityInfo(quality: audioTrack.qualities.get(index))
|
|
186
194
|
}
|
|
187
195
|
|
|
@@ -193,10 +201,12 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
193
201
|
}
|
|
194
202
|
|
|
195
203
|
private class func selectedAudioTrack(audioTracks: AudioTrackList) -> Int {
|
|
196
|
-
|
|
204
|
+
let audioTrackCount = audioTracks.count
|
|
205
|
+
guard audioTrackCount > 0 else {
|
|
197
206
|
return 0
|
|
198
207
|
}
|
|
199
|
-
for i in 0
|
|
208
|
+
for i in 0..<audioTrackCount {
|
|
209
|
+
guard i < audioTracks.count else { break }
|
|
200
210
|
let audioTrack: MediaTrack = audioTracks.get(i)
|
|
201
211
|
if audioTrack.enabled {
|
|
202
212
|
return audioTrack.uid
|
|
@@ -208,10 +218,12 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
208
218
|
// MARK: VIDEOTRACKS
|
|
209
219
|
private class func aggregatedVideoTrackListInfo(videoTracks: VideoTrackList) -> [[String:Any]] {
|
|
210
220
|
var videoTrackEntries:[[String:Any]] = []
|
|
211
|
-
|
|
221
|
+
let videoTrackCount = videoTracks.count
|
|
222
|
+
guard videoTrackCount > 0 else {
|
|
212
223
|
return videoTrackEntries
|
|
213
224
|
}
|
|
214
|
-
for i in 0
|
|
225
|
+
for i in 0..<videoTrackCount {
|
|
226
|
+
guard i < videoTracks.count else { break }
|
|
215
227
|
if let videoTrack: VideoTrack = videoTracks.get(i) as? VideoTrack {
|
|
216
228
|
videoTrackEntries.append(THEOplayerRCTTrackMetadataAggregator.aggregatedVideoTrackInfo(videoTrack: videoTrack))
|
|
217
229
|
}
|
|
@@ -230,7 +242,9 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
230
242
|
entry[PROP_ENABLED] = videoTrack.enabled
|
|
231
243
|
|
|
232
244
|
// add known qualities
|
|
233
|
-
|
|
245
|
+
let videoQualityCount = videoTrack.qualities.count
|
|
246
|
+
entry[PROP_QUALITIES] = (0..<videoQualityCount).compactMap { index -> [String:Any]? in
|
|
247
|
+
guard index < videoTrack.qualities.count else { return nil }
|
|
234
248
|
return THEOplayerRCTTrackMetadataAggregator.aggregatedQualityInfo(quality: videoTrack.qualities.get(index))
|
|
235
249
|
}
|
|
236
250
|
|
|
@@ -243,12 +257,14 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
243
257
|
}
|
|
244
258
|
|
|
245
259
|
private class func selectedVideoTrack(videoTracks: VideoTrackList) -> Int {
|
|
246
|
-
|
|
260
|
+
let videoTrackCount = videoTracks.count
|
|
261
|
+
guard videoTrackCount > 0 else {
|
|
247
262
|
return 0
|
|
248
263
|
}
|
|
249
|
-
for i in 0
|
|
264
|
+
for i in 0..<videoTrackCount {
|
|
265
|
+
guard i < videoTracks.count else { break }
|
|
250
266
|
let videoTrack: MediaTrack = videoTracks.get(i)
|
|
251
|
-
if
|
|
267
|
+
if videoTrack.enabled {
|
|
252
268
|
return videoTrack.uid
|
|
253
269
|
}
|
|
254
270
|
}
|
|
@@ -274,7 +290,7 @@ class THEOplayerRCTTrackMetadataAggregator {
|
|
|
274
290
|
"bandwidth": quality.bandwidth,
|
|
275
291
|
"codecs": "",
|
|
276
292
|
"id": identifier,
|
|
277
|
-
"uid":
|
|
293
|
+
"uid": quality.bandwidth,
|
|
278
294
|
"name": label,
|
|
279
295
|
"label": label,
|
|
280
296
|
"available": true,
|
|
@@ -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.
|
|
@@ -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
|
|
1
|
+
{"version":"11.2.1","buildDate":"2026-06-09T13:34:42.726Z"}
|
|
@@ -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
|
|
1
|
+
{"version":"11.2.1","buildDate":"2026-06-09T13:34:42.726Z"}
|
|
@@ -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"}
|
|
@@ -41,10 +41,8 @@ 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
|
*
|
|
@@ -109,4 +107,10 @@ export declare enum AdIntegrationKind {
|
|
|
109
107
|
csai = "csai",
|
|
110
108
|
theoads = "theoads"
|
|
111
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* The identifier of a custom ad integration.
|
|
112
|
+
*
|
|
113
|
+
* @category Ads
|
|
114
|
+
*/
|
|
115
|
+
export type CustomAdIntegrationKind = string & {};
|
|
112
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.1
|
|
3
|
+
"version": "11.2.1",
|
|
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.
|
|
@@ -44,10 +44,8 @@ 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.
|
|
@@ -116,3 +114,10 @@ export enum AdIntegrationKind {
|
|
|
116
114
|
csai = 'csai',
|
|
117
115
|
theoads = 'theoads',
|
|
118
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
|
|
1
|
+
{"version":"11.2.1","buildDate":"2026-06-09T13:34:42.726Z"}
|