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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Added

- Added `externalId` property to `TheoLiveDistribution` on Android and iOS.

## [11.3.0] - 26-06-18

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ private const val EVENT_PROP_ENDPOINT = "endpoint"
private const val EVENT_PROP_REASON = "reason"
private const val EVENT_PROP_NAME = "name"
private const val EVENT_PROP_ID = "id"
private const val EVENT_PROP_EXTERNAL_ID = "externalId"

class THEOliveEventAdapter(private val theoLiveApi: TheoLive, private val emitter: Emitter) {

Expand Down Expand Up @@ -68,6 +69,7 @@ class THEOliveEventAdapter(private val theoLiveApi: TheoLive, private val emitte
putString(EVENT_PROP_TYPE, "distributionloaded")
putMap(EVENT_PROP_DISTRIBUTION, Arguments.createMap().apply {
putString(EVENT_PROP_ID, event.getDistribution().id)
event.getDistribution().externalId?.let { putString(EVENT_PROP_EXTERNAL_ID, it) }
putString(EVENT_PROP_NAME, event.getDistribution().name)
})
})
Expand Down
4 changes: 4 additions & 0 deletions ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
let PROP_REASON_ERROR_CODE: String = "errorCode"
let PROP_REASON_ERROR_MESSAGE: String = "errorMessage"
let PROP_DISTRIBUTION_ID: String = "id"
let PROP_DISTRIBUTION_EXTERNAL_ID: String = "externalId"
let PROP_DISTRIBUTION_NAME: String = "name"

let PROP_CONTENTPROTECTION_INTEGRATION: String = "integration"
Expand Down Expand Up @@ -122,6 +123,9 @@

var distributionData: [String:Any] = [:]
distributionData[PROP_DISTRIBUTION_ID] = distribution.id
if let externalId = distribution.externalId {

Check failure on line 126 in ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift

View workflow job for this annotation

GitHub Actions / Build for iOS using XCode version 26.2.0

value of type 'any DistributionAPI' has no member 'externalId'

Check failure on line 126 in ios/theolive/THEOplayerRCTTHEOliveEventAdapter.swift

View workflow job for this annotation

GitHub Actions / Build for tvOS using XCode version 26.2.0

value of type 'any DistributionAPI' has no member 'externalId'
distributionData[PROP_DISTRIBUTION_EXTERNAL_ID] = externalId
}
distributionData[PROP_DISTRIBUTION_NAME] = distribution.name

return distributionData
Expand Down
1 change: 1 addition & 0 deletions src/api/theolive/TheoLiveDistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
*/
export interface TheoLiveDistribution {
id: string;
externalId?: string;
name: string;
}
Loading