diff --git a/android/src/main/java/com/theoplayer/theolive/EndpointAdapter.kt b/android/src/main/java/com/theoplayer/theolive/EndpointAdapter.kt index de863e955..cc7f83aa3 100644 --- a/android/src/main/java/com/theoplayer/theolive/EndpointAdapter.kt +++ b/android/src/main/java/com/theoplayer/theolive/EndpointAdapter.kt @@ -15,7 +15,9 @@ private const val PROP_MILLICAST_SUBSCRIBER_TOKEN ="subscriberToken" private const val PROP_MILLICAST_DIRECTOR_URL = "directorUrl" private const val PROP_HESP_SRC = "hespSrc" private const val PROP_HLS_SRC = "hlsSrc" +private const val PROP_HLS_MPEG_TS_SRC = "hlsMpegTsSrc" private const val PROP_AD_SRC = "adSrc" +private const val PROP_DAI_ASSET_KEY = "daiAssetKey" private const val PROP_CDN = "cdn" private const val PROP_TARGET_LATENCY = "targetLatency" private const val PROP_WEIGHT = "weight" @@ -44,7 +46,9 @@ object EndpointAdapter { endPoint.millicastSrc?.let { putMap(PROP_MILLICAST_SRC, fromEndPointMillicastSource(it)) } endPoint.hespSrc?.let { putString(PROP_HESP_SRC, it) } endPoint.hlsSrc?.let { putString(PROP_HLS_SRC, it) } + endPoint.hlsMpegTsSrc?.let { putString(PROP_HLS_MPEG_TS_SRC, it) } endPoint.adSrc?.let { putString(PROP_AD_SRC, it) } + endPoint.daiAssetKey?.let { putString(PROP_DAI_ASSET_KEY, it) } endPoint.cdn?.let { putString(PROP_CDN, it) } endPoint.targetLatency?.let { putDouble(PROP_TARGET_LATENCY, it) } putInt(PROP_WEIGHT, endPoint.weight) diff --git a/ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift b/ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift index d2d012616..7d3563635 100644 --- a/ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift +++ b/ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift @@ -9,9 +9,11 @@ import THEOplayerTHEOliveIntegration let PROP_ENDPOINT_HESP_SRC: String = "hespSrc" let PROP_ENDPOINT_HLS_SRC: String = "hlsSrc" +let PROP_ENDPOINT_HLS_MPEG_TS_SRC: String = "hlsMpegTsSrc" let PROP_ENDPOINT_MILLICAST_SRC: String = "millicastSrc" let PROP_ENDPOINT_CDN: String = "cdn" let PROP_ENDPOINT_AD_SRC: String = "adSrc" +let PROP_ENDPOINT_DAI_ASSET_KEY: String = "daiAssetKey" let PROP_ENDPOINT_WEIGHT: String = "weight" let PROP_ENDPOINT_PRIORITY: String = "priority" let PROP_ENDPOINT_CONTENT_PROTECTION: String = "contentProtection" @@ -46,6 +48,9 @@ class THEOplayerRCTTHEOliveEventAdapter { if let hlsSrc = endpoint.hlsSrc { endpointData[PROP_ENDPOINT_HLS_SRC] = hlsSrc } + if let hlsMpegTsSrc = endpoint.hlsMpegTsSrc { + endpointData[PROP_ENDPOINT_HLS_MPEG_TS_SRC] = hlsMpegTsSrc + } if let millicastSrc = endpoint.millicastSrc { endpointData[PROP_ENDPOINT_MILLICAST_SRC] = millicastSrc.toJSONEncodableDictionary() } @@ -55,6 +60,9 @@ class THEOplayerRCTTHEOliveEventAdapter { if let adSrc = endpoint.adSrc { endpointData[PROP_ENDPOINT_AD_SRC] = adSrc } + if let daiAssetKey = endpoint.daiAssetKey { + endpointData[PROP_ENDPOINT_DAI_ASSET_KEY] = daiAssetKey + } if let contentProtection = endpoint.channelContentProtection { endpointData[PROP_ENDPOINT_CONTENT_PROTECTION] = THEOplayerRCTTHEOliveEventAdapter.fromContentProtection(contentProtection: contentProtection) } diff --git a/src/api/theolive/TheoLiveEndpoint.ts b/src/api/theolive/TheoLiveEndpoint.ts index 7d06d598e..a2a369d48 100644 --- a/src/api/theolive/TheoLiveEndpoint.ts +++ b/src/api/theolive/TheoLiveEndpoint.ts @@ -1,3 +1,4 @@ +import { TheoLiveDistribution } from './TheoLiveDistribution'; import { WebrtcOptions } from './WebrtcOptions'; export interface EndpointMillicastSource { @@ -16,14 +17,57 @@ export interface EndpointMillicastSource { * @public */ export interface TheoLiveEndpoint { + /** + * The source of this endpoint. + * + * @remarks + * For most endpoint types, this is the source URL string. + * For millicast endpoints, this is a {@link EndpointMillicastSource} object. + * + * @platform web + */ + src?: string | EndpointMillicastSource; + + /** + * The type of source (e.g. 'hesp', 'hls', 'hlsMpegTs', 'millicast', 'dai'). + * + * @platform web + */ + srcType?: string; + + /** + * The provider of this endpoint (e.g. 'optiview'). + * + * @platform web + */ + provider?: string; + millicastSrc?: EndpointMillicastSource; hespSrc?: string; hlsSrc?: string; + hlsMpegTsSrc?: string; adSrc?: string; + daiAssetKey?: string; + cdn?: string; + + /** + * The target latency for this endpoint, in seconds. + * + * @platform android + */ + targetLatency?: number; + weight: number; priority: number; contentProtection?: ChannelDrmConfigResponse; + + /** + * The distribution associated with this endpoint. + * + * @platform web + */ + distribution?: TheoLiveDistribution; } /**