From f4297bd983a3a15262b719e85825be6aa4b40774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20K=C4=85kol?= Date: Wed, 10 Jan 2024 18:24:38 +0100 Subject: [PATCH] make simulcastConfig nulable in TracksAdded --- .../java/org/membraneframework/rtc/InternalMembraneRTC.kt | 5 +---- .../src/main/java/org/membraneframework/rtc/events/Event.kt | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/MembraneRTC/src/main/java/org/membraneframework/rtc/InternalMembraneRTC.kt b/MembraneRTC/src/main/java/org/membraneframework/rtc/InternalMembraneRTC.kt index cecf559..212464f 100644 --- a/MembraneRTC/src/main/java/org/membraneframework/rtc/InternalMembraneRTC.kt +++ b/MembraneRTC/src/main/java/org/membraneframework/rtc/InternalMembraneRTC.kt @@ -230,7 +230,6 @@ constructor( otherEndpoints.forEach { this.remoteEndpoints[it.id] = it - Timber.tag("AAA").d(it.toString()) for ((trackId, metadata) in it.trackIdToMetadata) { val context = TrackContext(track = null, endpoint = it, trackId = trackId, metadata = metadata, simulcastConfig = it.tracks[trackId]?.simulcastConfig) @@ -353,10 +352,8 @@ constructor( remoteEndpoints[updatedEndpoint.id] = updatedEndpoint for ((trackId, metadata) in updatedEndpoint.trackIdToMetadata) { - - val context = TrackContext(track = null, endpoint = endpoint, trackId = trackId, metadata = metadata, simulcastConfig = updatedEndpoint.tracks[trackId]?.simulcastConfig) - Timber.tag("AAA").d(context.toString()) + this.trackContexts[trackId] = context this.listener.onTrackAdded(context) diff --git a/MembraneRTC/src/main/java/org/membraneframework/rtc/events/Event.kt b/MembraneRTC/src/main/java/org/membraneframework/rtc/events/Event.kt index 887c7f6..25ff52a 100644 --- a/MembraneRTC/src/main/java/org/membraneframework/rtc/events/Event.kt +++ b/MembraneRTC/src/main/java/org/membraneframework/rtc/events/Event.kt @@ -257,7 +257,7 @@ data class OfferData(val type: ReceivableEventType, val data: Data) : Receivable data class TracksAdded(val type: ReceivableEventType, val data: Data) : ReceivableEvent() { data class Data(val endpointId: String, val trackIdToMetadata: Map, val tracks: Map){ - data class TrackData(val metadata: Metadata, val simulcastConfig: SimulcastConfig) + data class TrackData(val metadata: Metadata, val simulcastConfig: SimulcastConfig?) } }