diff --git a/CHANGELOG.md b/CHANGELOG.md index d5cc08c42..6cad906e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Fixed an issue where the Cast API wouldn't be initialized yet when in the `onPlayerReady` callback. +- Added support for THEOplayer Android v7.6.0. ## [7.4.0] - 24-06-11 diff --git a/android/build.gradle b/android/build.gradle index 06a5b60eb..24a099242 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -112,13 +112,14 @@ dependencies { implementation "androidx.appcompat:appcompat:${safeExtGet('appcompatVersion', '1.6.1')}" implementation "androidx.core:core-ktx:${safeExtGet('corektxVersion', '1.10.1')}" - // The minimum supported THEOplayer version is 7.0.0 - def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.0.0, 8.0.0)') + // The minimum supported THEOplayer version is 7.6.0 + def theoplayer_sdk_version = safeExtGet('THEOplayer_sdk', '[7.6.0, 8.0.0)') + def theoplayer_mediasession_version = safeExtGet('THEOplayer_mediasession', '[7.5.0, 8.0.0)') println("Using THEOplayer (${versionString(theoplayer_sdk_version)})") implementation "com.theoplayer.theoplayer-sdk-android:core:${theoplayer_sdk_version}" - implementation "com.theoplayer.theoplayer-sdk-android:ads-wrapper:7.0.0" - implementation "com.theoplayer.android-connector:mediasession:${theoplayer_sdk_version}" + implementation "com.theoplayer.theoplayer-sdk-android:ads-wrapper:7.6.0" + implementation "com.theoplayer.android-connector:mediasession:${theoplayer_mediasession_version}" if (enabledGoogleIMA) { println('Enable THEOplayer IMA extension.') diff --git a/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.0.0/ads-wrapper-7.0.0.aar b/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.0.0/ads-wrapper-7.0.0.aar deleted file mode 100644 index 0ee50ad9d..000000000 Binary files a/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.0.0/ads-wrapper-7.0.0.aar and /dev/null differ diff --git a/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.0/ads-wrapper-7.6.0.aar b/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.0/ads-wrapper-7.6.0.aar new file mode 100644 index 000000000..52338234b Binary files /dev/null and b/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.0/ads-wrapper-7.6.0.aar differ diff --git a/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.0.0/ads-wrapper-7.0.0.pom b/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.0/ads-wrapper-7.6.0.pom similarity index 85% rename from android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.0.0/ads-wrapper-7.0.0.pom rename to android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.0/ads-wrapper-7.6.0.pom index 4928878f7..252234f9f 100644 --- a/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.0.0/ads-wrapper-7.0.0.pom +++ b/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/7.6.0/ads-wrapper-7.6.0.pom @@ -1,9 +1,9 @@ - 7.0.0 + 7.6.0 com.theoplayer.theoplayer-sdk-android ads-wrapper - 7.0.0 + 7.6.0 aar diff --git a/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml b/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml index b8b6fd26f..bf6862f55 100644 --- a/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml +++ b/android/local/com/theoplayer/theoplayer-sdk-android/ads-wrapper/maven-metadata-local.xml @@ -3,11 +3,11 @@ com.theoplayer.theoplayer-sdk-android ads-wrapper - 7.0.0 - 7.0.0 + 7.6.0 + 7.6.0 - 7.0.0 + 7.6.0 - 20240425153844 + 20240618230000 diff --git a/android/src/main/java/com/theoplayer/ads/AdAdapter.kt b/android/src/main/java/com/theoplayer/ads/AdAdapter.kt index b953326b0..5a8c26c48 100644 --- a/android/src/main/java/com/theoplayer/ads/AdAdapter.kt +++ b/android/src/main/java/com/theoplayer/ads/AdAdapter.kt @@ -16,6 +16,7 @@ import java.lang.Exception private const val PROP_AD_SYSTEM = "adSystem" private const val PROP_AD_INTEGRATION = "integration" +private const val PROP_AD_CUSTOM_INTEGRATION = "customIntegration" private const val PROP_AD_TYPE = "type" private const val PROP_AD_ID = "id" private const val PROP_AD_BREAK = "adBreak" @@ -208,6 +209,10 @@ object AdAdapter { return AdIntegrationKind.from(ad.getString(PROP_AD_INTEGRATION)) } + override fun getCustomIntegration(): String? { + return ad.getString(PROP_AD_CUSTOM_INTEGRATION) + } + override fun getImaAd(): com.google.ads.interactivemedia.v3.api.Ad { return parseImaAd(ad) } @@ -279,6 +284,10 @@ object AdAdapter { override fun getIntegration(): AdIntegrationKind { return AdIntegrationKind.from(adBreak.getString(PROP_ADBREAK_INTEGRATION)) } + + override fun getCustomIntegration(): String? { + return adBreak.getString(PROP_AD_CUSTOM_INTEGRATION) + } } } diff --git a/android/src/main/java/com/theoplayer/source/GoogleDaiSourceAdapter.kt b/android/src/main/java/com/theoplayer/source/GoogleDaiSourceAdapter.kt new file mode 100644 index 000000000..acdbfbd3b --- /dev/null +++ b/android/src/main/java/com/theoplayer/source/GoogleDaiSourceAdapter.kt @@ -0,0 +1,34 @@ +package com.theoplayer.source + +import com.google.gson.Gson +import com.theoplayer.BuildConfig +import com.theoplayer.android.api.error.ErrorCode +import com.theoplayer.android.api.error.THEOplayerException +import com.theoplayer.android.api.source.GoogleDaiTypedSource +import com.theoplayer.android.api.source.TypedSource +import com.theoplayer.android.api.source.ssai.dai.GoogleDaiLiveConfiguration +import com.theoplayer.android.api.source.ssai.dai.GoogleDaiVodConfiguration +import org.json.JSONObject + +private const val PROP_AVAILABILITY_TYPE = "availabilityType" +private const val AVAILABILITY_TYPE_VOD = "vod" +private const val ERROR_DAI_NOT_ENABLED = "Google DAI support not enabled." + +@Throws(THEOplayerException::class) +fun googleDaiBuilderFromJson(builder: TypedSource.Builder, json: JSONObject): TypedSource.Builder { + // Check whether the integration was enabled + if (!BuildConfig.EXTENSION_GOOGLE_DAI) { + throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_DAI_NOT_ENABLED) + } + // We need to create a new builder as the player SDK checks for: + // typedSource is GoogleDaiTypedSource + return if (json.optString(PROP_AVAILABILITY_TYPE) == AVAILABILITY_TYPE_VOD) { + GoogleDaiTypedSource.Builder( + Gson().fromJson(json.toString(), GoogleDaiVodConfiguration::class.java) + ) + } else { + GoogleDaiTypedSource.Builder( + Gson().fromJson(json.toString(), GoogleDaiLiveConfiguration::class.java) + ) + } +} diff --git a/android/src/main/java/com/theoplayer/source/SSAIAdapterRegistry.kt b/android/src/main/java/com/theoplayer/source/SSAIAdapterRegistry.kt new file mode 100644 index 000000000..a498aa88c --- /dev/null +++ b/android/src/main/java/com/theoplayer/source/SSAIAdapterRegistry.kt @@ -0,0 +1,51 @@ +package com.theoplayer.source + +import android.text.TextUtils +import com.theoplayer.android.api.error.ErrorCode +import com.theoplayer.android.api.error.THEOplayerException +import com.theoplayer.android.api.source.SourceType +import com.theoplayer.android.api.source.TypedSource +import org.json.JSONObject + +typealias CustomSSAIAdapter = (json: JSONObject, currentBuilder: TypedSource.Builder) -> TypedSource.Builder + +private const val ERROR_UNSUPPORTED_SSAI_INTEGRATION = "Unsupported SSAI integration" +private const val ERROR_MISSING_SSAI_INTEGRATION = "Missing SSAI integration" +private const val PROP_INTEGRATION = "integration" + +object SSAIAdapterRegistry { + private val _adapters: MutableMap = HashMap() + + fun register(integration: String, adapter: CustomSSAIAdapter) { + _adapters[integration] = adapter + } + + fun hasIntegration(integration: String): Boolean { + return _adapters[integration] != null + } + + fun typedSourceBuilderFromJson(json: JSONObject, currentBuilder: TypedSource.Builder, sourceType: SourceType?): TypedSource.Builder { + // Check for valid SsaiIntegration + val ssaiIntegrationStr = json.optString(PROP_INTEGRATION) + + // Check for valid `integration` property, which is mandatory. + if (TextUtils.isEmpty(ssaiIntegrationStr)) { + throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_MISSING_SSAI_INTEGRATION) + } + + // Check for known SsaiIntegration + if (!hasIntegration(ssaiIntegrationStr)) { + throw THEOplayerException( + ErrorCode.AD_ERROR, + "$ERROR_UNSUPPORTED_SSAI_INTEGRATION: $ssaiIntegrationStr" + ) + } + + // Prefer DASH if SSAI type not specified + if (sourceType == null) { + currentBuilder.type(SourceType.DASH) + } + + return _adapters[ssaiIntegrationStr]?.invoke(json, currentBuilder) ?: currentBuilder + } +} diff --git a/android/src/main/java/com/theoplayer/source/SourceAdapter.kt b/android/src/main/java/com/theoplayer/source/SourceAdapter.kt index ce4ef1ce8..bb4249775 100644 --- a/android/src/main/java/com/theoplayer/source/SourceAdapter.kt +++ b/android/src/main/java/com/theoplayer/source/SourceAdapter.kt @@ -2,11 +2,9 @@ package com.theoplayer.source import android.text.TextUtils import android.util.Log -import com.facebook.react.bridge.Arguments import com.google.gson.Gson import com.theoplayer.android.api.error.THEOplayerException import com.facebook.react.bridge.ReadableMap -import com.facebook.react.bridge.WritableArray import com.facebook.react.bridge.WritableMap import com.theoplayer.android.api.source.SourceDescription import com.theoplayer.android.api.source.TypedSource @@ -14,10 +12,6 @@ import com.theoplayer.android.api.source.metadata.MetadataDescription import com.theoplayer.android.api.source.addescription.AdDescription import com.theoplayer.android.api.source.TextTrackDescription import com.theoplayer.android.api.source.SourceType -import com.theoplayer.android.api.source.ssai.SsaiIntegration -import com.theoplayer.android.api.source.GoogleDaiTypedSource -import com.theoplayer.android.api.source.ssai.dai.GoogleDaiVodConfiguration -import com.theoplayer.android.api.source.ssai.dai.GoogleDaiLiveConfiguration import com.theoplayer.android.api.source.hls.HlsPlaybackConfiguration import com.theoplayer.android.api.event.ads.AdIntegrationKind import com.theoplayer.android.api.source.addescription.GoogleImaAdDescription @@ -55,19 +49,26 @@ private const val PROP_INTEGRATION = "integration" private const val PROP_TEXT_TRACKS = "textTracks" private const val PROP_POSTER = "poster" private const val PROP_ADS = "ads" -private const val PROP_AVAILABILITY_TYPE = "availabilityType" private const val PROP_DASH = "dash" private const val PROP_DASH_IGNORE_AVAILABILITYWINDOW = "ignoreAvailabilityWindow" -private const val ERROR_DAI_NOT_ENABLED = "Google DAI support not enabled." -private const val ERROR_UNSUPPORTED_SSAI_INTEGRATION = "Unsupported SSAI integration" -private const val ERROR_MISSING_SSAI_INTEGRATION = "Missing SSAI integration" private const val ERROR_IMA_NOT_ENABLED = "Google IMA support not enabled." private const val ERROR_UNSUPPORTED_CSAI_INTEGRATION = "Unsupported CSAI integration" private const val ERROR_MISSING_CSAI_INTEGRATION = "Missing CSAI integration" +private const val PROP_SSAI_INTEGRATION_GOOGLE_DAI = "google-dai" + class SourceAdapter { private val gson = Gson() + companion object { + init { + // Register default SSAI adapter for Google DAI. + SSAIAdapterRegistry.register(PROP_SSAI_INTEGRATION_GOOGLE_DAI) { json, currentBuilder -> + googleDaiBuilderFromJson(currentBuilder, json) + } + } + } + @Throws(THEOplayerException::class) fun parseSourceFromJS(source: ReadableMap?): SourceDescription? { if (source == null) { @@ -83,17 +84,11 @@ class SourceAdapter { val jsonSources = jsonSourceObject.optJSONArray(PROP_SOURCES) if (jsonSources != null) { for (i in 0 until jsonSources.length()) { - val typedSource = parseTypedSource(jsonSources[i] as JSONObject) - if (typedSource != null) { - typedSources.add(typedSource) - } + typedSources.add(parseTypedSource(jsonSources[i] as JSONObject)) } } else { val jsonSource = jsonSourceObject.optJSONObject(PROP_SOURCES) ?: return null - val typedSource = parseTypedSource(jsonSource) - if (typedSource != null) { - typedSources.add(typedSource) - } + typedSources.add(parseTypedSource(jsonSource)) } // poster @@ -142,48 +137,13 @@ class SourceAdapter { } @Throws(THEOplayerException::class) - private fun parseTypedSource(jsonTypedSource: JSONObject): TypedSource? { + private fun parseTypedSource(jsonTypedSource: JSONObject): TypedSource { try { var tsBuilder = TypedSource.Builder(jsonTypedSource.optString(PROP_SRC)) val sourceType = parseSourceType(jsonTypedSource) if (jsonTypedSource.has(PROP_SSAI)) { val ssaiJson = jsonTypedSource.getJSONObject(PROP_SSAI) - - // Check for valid SsaiIntegration - val ssaiIntegrationStr = ssaiJson.optString(PROP_INTEGRATION) - if (!TextUtils.isEmpty(ssaiIntegrationStr)) { - val ssaiIntegration = SsaiIntegration.from(ssaiIntegrationStr) - ?: throw THEOplayerException( - ErrorCode.AD_ERROR, - "$ERROR_UNSUPPORTED_SSAI_INTEGRATION: $ssaiIntegrationStr" - ) - when (ssaiIntegration) { - SsaiIntegration.GOOGLE_DAI -> { - if (!BuildConfig.EXTENSION_GOOGLE_DAI) { - throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_DAI_NOT_ENABLED) - } - tsBuilder = if (ssaiJson.optString(PROP_AVAILABILITY_TYPE) == "vod") { - GoogleDaiTypedSource.Builder( - gson.fromJson(ssaiJson.toString(), GoogleDaiVodConfiguration::class.java) - ) - } else { - GoogleDaiTypedSource.Builder( - gson.fromJson(ssaiJson.toString(), GoogleDaiLiveConfiguration::class.java) - ) - } - // Prefer DASH if not SSAI type specified - if (sourceType == null) { - tsBuilder.type(SourceType.DASH) - } - } - else -> throw THEOplayerException( - ErrorCode.AD_ERROR, - "$ERROR_UNSUPPORTED_SSAI_INTEGRATION: $ssaiIntegrationStr" - ) - } - } else { - throw THEOplayerException(ErrorCode.AD_ERROR, ERROR_MISSING_SSAI_INTEGRATION) - } + tsBuilder = SSAIAdapterRegistry.typedSourceBuilderFromJson(ssaiJson, tsBuilder, sourceType) } if (sourceType != null) { tsBuilder.type(sourceType) @@ -216,10 +176,13 @@ class SourceAdapter { } } return tsBuilder.build() - } catch (e: JSONException) { - e.printStackTrace() + } catch (e: THEOplayerException) { + // Rethrow THEOplayerException + throw e + } catch (e: Exception) { + // Wrap exception + throw THEOplayerException(ErrorCode.SOURCE_INVALID, "Invalid source: ${e.message}") } - return null } @Throws(THEOplayerException::class) @@ -281,12 +244,14 @@ class SourceAdapter { AdIntegrationKind.GOOGLE_IMA -> parseImaAdFromJS( jsonAdDescription ) + AdIntegrationKind.DEFAULT -> { throw THEOplayerException( ErrorCode.AD_ERROR, "$ERROR_UNSUPPORTED_CSAI_INTEGRATION: $integrationKindStr" ) } + else -> { throw THEOplayerException( ErrorCode.AD_ERROR, diff --git a/example/android/gradle.properties b/example/android/gradle.properties index e621c18b3..fdfc5a93f 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -41,7 +41,7 @@ newArchEnabled=false hermesEnabled=true # Version of the THEOplayer SDK, if not specified, the latest available version within bounds is set. -#THEOplayer_sdk=[7.0.0, 8.0.0) +#THEOplayer_sdk=[7.6.0, 8.0.0) # Override Android sdk versions #THEOplayer_compileSdkVersion = 34 diff --git a/src/api/source/ads/FreeWheelAdDescription.ts b/src/api/source/ads/FreeWheelAdDescription.ts deleted file mode 100644 index 5be44d2c6..000000000 --- a/src/api/source/ads/FreeWheelAdDescription.ts +++ /dev/null @@ -1,97 +0,0 @@ -import type { AdDescription, AdIntegrationKind } from "./Ads"; - -/** - * The possible ad unit types, represented by a value from the following list: - *
- `'preroll'`: The linear ad will play before the content started. - *
- `'midroll'`: The linear ad will play at a time offset during the content. - *
- `'postroll'`: The linear ad will play after the content ended. - *
- `'overlay'`: The non-linear ad. - * - * @public - */ -export type FreeWheelAdUnitType = 'preroll' | 'midroll' | 'postroll' | 'overlay'; - -/** - * Represents a FreeWheel cue. - * - * @public - */ -export interface FreeWheelCue { - /** - * The ad unit type. - */ - adUnit: FreeWheelAdUnitType; - - /** - * Offset after which the ad break will start, in seconds. - */ - timeOffset: number; -} - -/** - * Describes a FreeWheel ad break request. - * - * @remarks - *
- Available since v2.42.0. - * - * @public - */ -export interface FreeWheelAdDescription extends AdDescription { - /** - * The integration of this ad break. - */ - integration: AdIntegrationKind.freewheel; - - /** - * The FreeWheel ad server URL. - */ - adServerUrl: string; - - /** - * The duration of the asset, in seconds. - * - * @remarks - *
- Optional for live assets. - */ - assetDuration?: number; - - /** - * The identifier of the asset. - * - * @remarks - *
- Generated by FreeWheel CMS when an asset is uploaded. - */ - assetId?: string; - - /** - * The network identifier which is associated with a FreeWheel customer. - */ - networkId: number; - - /** - * The server side configuration profile. - * - * @remarks - *
- Used to indicate desired player capabilities. - */ - profile: string; - - /** - * The identifier of the video player's location. - */ - siteSectionId?: string; - - /** - * List of cue points. - * - * @remarks - *
- Not available in all FreeWheel modes. - */ - cuePoints?: FreeWheelCue[]; - - /** - * A record of query string parameters added to the FreeWheel ad break request. - * Each entry contains the parameter name with associated value. - */ - customData?: Record; -} diff --git a/src/api/source/ads/SpotXAdDescription.ts b/src/api/source/ads/SpotXAdDescription.ts deleted file mode 100644 index c3a41c427..000000000 --- a/src/api/source/ads/SpotXAdDescription.ts +++ /dev/null @@ -1,126 +0,0 @@ -import type { AdDescription } from "./Ads"; - -/** - * Represents a geographical location. - * - * @public - */ -export interface Geo { - /** - * The latitude of this location. - */ - readonly lat: number; - - /** - * The longitude of this location. - */ - readonly lon: number; -} - -/** - * A record of SpotX query string parameters. - * Each entry contains the parameter name with associated value. - * - * @public - */ -export interface SpotxData { - [key: string]: string | number | boolean | string[] | Geo; -} - -/** - * A record of SpotX query string parameters which can be a nested structure. - * Each entry contains the parameter name with associated value. - * - * @public - */ -export interface SpotxQueryParameter { - [key: string]: string | number | boolean | string[] | Geo | SpotxData | SpotxData[]; -} - -/** - * Describes a SpotX ad break request. - * - * @remarks - *
- Available since v2.13.0. - * - * @example - * ``` - * { - * integration: 'spotx', - * id: 123456, - * cacheBuster: true, - * app: { - * bundle: 'com.exampleapps.example', - * name: 'My CTV App' - * }, - * device: { - * ifa: '38400000-8cf0-11bd-b23e-10b96e40000d', - * ua: 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1', - * geo: { - * lat: -24.378528, - * lon: -128.325119 - * }, - * dnt: 1, - * lmt: 1, - * }, - * custom: { - * category: ['category1', 'category2'], - * somekey: 'somevalue' - * } - * user: { - * yob: 1984, - * gender: 'm' - * } - * } - * ``` - * - * @public - */ -export interface SpotXAdDescription extends AdDescription { - /** - * The identifier of the ad break requested from SpotX. - */ - id: number | string; - - /** - * The maximum duration of the ad, in seconds. - * - * @defaultValue No maximum duration. - */ - maximumAdDuration?: number | string; - - /** - * The URL of the content page. - */ - contentPageUrl?: string; - - /** - * The IP address of the viewer. - */ - ipAddress?: string; - - /** - * Whether the ad break request should contain a cache buster. - * - * @remarks - *
- A cache buster adds a query parameter 'cb' with a random value to circumvent browser caching mechanisms. - */ - cacheBuster?: boolean; - - /** - * A source URL which contains the location of ad resources to be scheduled. - * - * @remarks - *
- This will override the generated URL. - */ - sources?: string; - - /** - * A record of query string parameters added to the SpotX ad break request. - * Each entry contains the parameter name with associated value. - * - * @remarks - *
- Available since v2.38.0. - */ - queryParameters?: SpotxQueryParameter; -} diff --git a/src/api/source/ads/barrel.ts b/src/api/source/ads/barrel.ts index 627d0d0da..72b734489 100644 --- a/src/api/source/ads/barrel.ts +++ b/src/api/source/ads/barrel.ts @@ -1,6 +1,4 @@ export * from './Ads'; -export * from './FreeWheelAdDescription'; export * from './IMAAdDescription'; -export * from './SpotXAdDescription'; export * from './THEOplayerAdDescription'; export * from './ssai/barrel'; diff --git a/src/api/source/ads/ssai/GoogleDAIConfiguration.ts b/src/api/source/ads/ssai/GoogleDAIConfiguration.ts index da1aeb1a2..33de4e8ad 100644 --- a/src/api/source/ads/ssai/GoogleDAIConfiguration.ts +++ b/src/api/source/ads/ssai/GoogleDAIConfiguration.ts @@ -20,9 +20,6 @@ export type DAIAvailabilityType = 'vod' | 'live'; /** * Represents a configuration for server-side ad insertion with the Google DAI pre-integration. * - * @remarks - *
- Available since v2.30.0. - * * @public */ export interface GoogleDAIConfiguration extends ServerSideAdInsertionConfiguration { @@ -75,9 +72,6 @@ export interface GoogleDAIConfiguration extends ServerSideAdInsertionConfigurati /** * Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a Live media stream. * - * @remarks - *
- Available since v2.30.0. - * * @public */ export interface GoogleDAILiveConfiguration extends GoogleDAIConfiguration { @@ -99,9 +93,6 @@ export interface GoogleDAILiveConfiguration extends GoogleDAIConfiguration { /** * Represents a configuration for server-side ad insertion with the Google DAI pre-integration for a VOD media stream. * - * @remarks - *
- Available since v2.30.0. - * * @public */ export interface GoogleDAIVodConfiguration extends GoogleDAIConfiguration { diff --git a/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.ts b/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.ts deleted file mode 100644 index f6e6ce77f..000000000 --- a/src/api/source/ads/ssai/ImagineServerSideAdInsertionConfiguration.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { TypedSource } from '../../SourceDescription'; -import type { ServerSideAdInsertionConfiguration } from './ServerSideAdInsertionConfiguration'; - -/** - * The identifier of the Imagine integration. - * - * @public - */ -export type ImagineSSAIIntegrationID = 'imagine'; - -/** - * Describes the SSAI configuration of the Imagine integration. - * - * @public - */ -export interface ImagineServerSideAdInsertionConfiguration extends ServerSideAdInsertionConfiguration { - /** - * {@inheritDoc ServerSideAdInsertionConfiguration.integration} - */ - integration: ImagineSSAIIntegrationID; -} - -/** - * Describes a source of the Imagine integration. - * - * @public - */ -export interface ImagineTypedSource extends TypedSource { - ssai: ImagineServerSideAdInsertionConfiguration; -} diff --git a/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts b/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts index 0ebfb474c..c9cb3e769 100644 --- a/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts +++ b/src/api/source/ads/ssai/ServerSideAdInsertionConfiguration.ts @@ -1,23 +1,16 @@ -import type { YospaceSSAIIntegrationID } from './YospaceServerSideAdInsertionConfiguration'; import type { GoogleDAISSAIIntegrationID } from './GoogleDAIConfiguration'; -import type { ImagineSSAIIntegrationID } from './ImagineServerSideAdInsertionConfiguration'; /** - * The identifier of a server-side ad insertion pre-integration, represented by a value from the following list: - *
- `'yospace'`: The configuration with this identifier is a {@link YospaceServerSideAdInsertionConfiguration} - *
- `'google-dai'`: The configuration with this identifier is a {@link GoogleDAIConfiguration} - *
- `'imagine'`: The configuration with this identifier is a {@link ImagineServerSideAdInsertionConfiguration} + * The identifier of a server-side ad insertion pre-integration, represented by a string value. * * @public */ -export type SSAIIntegrationId = YospaceSSAIIntegrationID | GoogleDAISSAIIntegrationID | ImagineSSAIIntegrationID; +export type SSAIIntegrationId = GoogleDAISSAIIntegrationID | CustomSSAIIntegrationId; +export type CustomSSAIIntegrationId = string; /** * Represents a configuration for server-side ad insertion (SSAI). * - * @remarks - *
- Available since v2.12.0. - * * @public */ export interface ServerSideAdInsertionConfiguration { diff --git a/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.ts b/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.ts deleted file mode 100644 index d827f8897..000000000 --- a/src/api/source/ads/ssai/YospaceServerSideAdInsertionConfiguration.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { ServerSideAdInsertionConfiguration } from './ServerSideAdInsertionConfiguration'; -import type { TypedSource } from '../../SourceDescription'; - -/** - * The identifier of the Yospace integration. - * - * @public - */ -export type YospaceSSAIIntegrationID = 'yospace'; - -/** - * The type of the Yospace stream, represented by a value from the following list: - *
- `'live'`: The stream is a live stream. - *
- `'livepause'`: The stream is a live stream with a large DVR window. - *
- `'nonlinear'`: The stream is a Non-Linear Start-Over stream. - *
- `'vod'`: The stream is a video-on-demand stream. - * - * @public - */ -export type YospaceStreamType = 'vod' | 'live' | 'livepause' | 'nonlinear'; - -/** - * Represents a configuration for server-side ad insertion with the Yospace pre-integration. - * - * @remarks - *
- Available since v2.14.7. - * - * @public - */ -export interface YospaceServerSideAdInsertionConfiguration extends ServerSideAdInsertionConfiguration { - /** - * The identifier for the SSAI pre-integration. - */ - integration: YospaceSSAIIntegrationID; - - /** - * The type of the requested stream. - * - * @defaultValue `'live'` - */ - streamType?: YospaceStreamType; -} - -/** - * Represents a media resource with a Yospace server-side ad insertion request. - * - * @public - */ -export interface YospaceTypedSource extends TypedSource { - ssai: YospaceServerSideAdInsertionConfiguration; -} diff --git a/src/api/source/ads/ssai/barrel.ts b/src/api/source/ads/ssai/barrel.ts index c169f5a18..edde39174 100644 --- a/src/api/source/ads/ssai/barrel.ts +++ b/src/api/source/ads/ssai/barrel.ts @@ -1,4 +1,2 @@ export * from './GoogleDAIConfiguration'; -export * from './ImagineServerSideAdInsertionConfiguration'; export * from './ServerSideAdInsertionConfiguration'; -export * from './YospaceServerSideAdInsertionConfiguration';