Skip to content
Open
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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.1.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- Added `millicastSrc` to `TheoLiveEndpoint` for Web and Android.

## [10.2.2] - 25-10-23

- Fixed a build issue on iOS/tvOS due to a breaking change on the THEOplayerSDK.Ad protocol in iOS SDK 10.3.0 .
Expand Down
16 changes: 16 additions & 0 deletions android/src/main/java/com/theoplayer/theolive/EndpointAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.theoplayer.android.api.theolive.ContentProtectionConfiguration
import com.theoplayer.android.api.theolive.Endpoint
import com.theoplayer.android.api.theolive.EndpointMillicastSource
import com.theoplayer.android.api.theolive.FairPlayConfiguration
import com.theoplayer.android.api.theolive.KeySystemConfiguration

private const val PROP_MILLICAST_SRC = "millicastSrc"
private const val PROP_MILLICAST_NAME = "name"
private const val PROP_MILLICAST_ACCOUNTID = "accountId"
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_AD_SRC = "adSrc"
Expand All @@ -24,8 +30,18 @@ private const val PROP_CERTIFICATE_URL = "certificateUrl"

object EndpointAdapter {

fun fromEndPointMillicastSource(millicastSource: EndpointMillicastSource): WritableMap {
return Arguments.createMap().apply {
putString(PROP_MILLICAST_NAME , millicastSource.name)
putString(PROP_MILLICAST_ACCOUNTID, millicastSource.accountId)
millicastSource.directorUrl?.let { putString(PROP_MILLICAST_DIRECTOR_URL, it) }
millicastSource.subscriberToken?.let { putString(PROP_MILLICAST_SUBSCRIBER_TOKEN, it) }
}
}

fun fromEndpoint(endPoint: Endpoint): WritableMap {
return Arguments.createMap().apply {
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.adSrc?.let { putString(PROP_AD_SRC, it) }
Expand Down
8 changes: 8 additions & 0 deletions src/api/theolive/TheoLiveEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
export interface EndpointMillicastSource {
name: string;
accountId: string;
subscriberToken?: string;
directorUrl?: string;
}

/**
* Description of a THEOlive Endpoint.
*
Expand All @@ -6,6 +13,7 @@
* @public
*/
export interface TheoLiveEndpoint {
millicastSrc?: EndpointMillicastSource;
hespSrc?: string;
hlsSrc?: string;
adSrc?: string;
Expand Down