Open liuyang2211 opened 8 hours ago
Describe the bug When I wanted to obtain remote audio stream data in a way similar to getting local audio stream data, an exception crash occurred.
is RoomEvent.ActiveSpeakersChanged -> { if (event.speakers.isEmpty()) return@collect event.speakers.firstOrNull()!!::audioTrackPublications.flow .flatMapLatest { tracks -> Log.d("-------", "tracks change") if (tracks.firstOrNull()?.first?.track !is LocalAudioTrack) { val audioSteamData = tracks.firstOrNull()?.first?.track as? RemoteAudioTrack audioSteamData?.addSink(audioSinkActive) } flowOf(tracks) } }
private val audioSinkActive = AudioTrackSink { p0, p1, p2, p3, p4, p5 -> Log.d( "-------", "Manager: audioSinkActive: p0:$p0\n" + " p1:$p1\n" + " p2:$p2\n" + " p3:$p3\n" + " p4:$p4\n" + " p5:$p5" )
}
Device Info:
Additional context Add any other context about the problem here.
#
Describe the bug When I wanted to obtain remote audio stream data in a way similar to getting local audio stream data, an exception crash occurred.
is RoomEvent.ActiveSpeakersChanged -> { if (event.speakers.isEmpty()) return@collect event.speakers.firstOrNull()!!::audioTrackPublications.flow .flatMapLatest { tracks -> Log.d("-------", "tracks change") if (tracks.firstOrNull()?.first?.track !is LocalAudioTrack) { val audioSteamData = tracks.firstOrNull()?.first?.track as? RemoteAudioTrack audioSteamData?.addSink(audioSinkActive) } flowOf(tracks) } }
private val audioSinkActive = AudioTrackSink { p0, p1, p2, p3, p4, p5 -> Log.d( "-------", "Manager: audioSinkActive: p0:$p0\n" + " p1:$p1\n" + " p2:$p2\n" + " p3:$p3\n" + " p4:$p4\n" + " p5:$p5" )
}
Device Info:
Additional context Add any other context about the problem here.