Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
}
Expand All @@ -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)
}
Expand Down
44 changes: 44 additions & 0 deletions src/api/theolive/TheoLiveEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { TheoLiveDistribution } from './TheoLiveDistribution';
import { WebrtcOptions } from './WebrtcOptions';

export interface EndpointMillicastSource {
Expand All @@ -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;
}

/**
Expand Down
Loading