Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
add localTracksReady map variable
Browse files Browse the repository at this point in the history
  • Loading branch information
karkakol committed Jun 12, 2024
1 parent 136e73d commit 6c5c5ea
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ internal class InternalMembraneRTC(
Log.i(T, "updateTrackMetadata")
Log.i(T, trackMetadata.toString())
Log.i(T,"")
if(localTracksReady[trackId] ?: false) return
if(localTracksReady[trackId] != true) return

// val mutex = getMutexForTrack(trackId)
coroutineScope.launch {
Expand Down Expand Up @@ -422,13 +422,14 @@ internal class InternalMembraneRTC(


coroutineScope.launch {
midToTrackId.forEach{
localTracksReady[it.value] = true
}


peerConnectionManager.onSdpAnswer(sdp, midToTrackId)

localTracksMutex.withLock {
midToTrackId.forEach{
localTracksReady[it.value] = true
}
// temporary workaround, the backend doesn't add ~ in sdp answer
localTracks.forEach { localTrack ->
if (localTrack.rtcTrack().kind() != "video") return@forEach
Expand Down

0 comments on commit 6c5c5ea

Please sign in to comment.