refactor: improve background streaming handler by optimizing active stream management
- Removed unnecessary clearing of active streams in the Android implementation, allowing for more efficient management of stream IDs. - Updated iOS implementation to use formUnion and formIntersection for better handling of active and microphone streams, enhancing performance and clarity in stream management. - Ensured that microphone activation only occurs when there are active microphone streams, improving resource utilization.
This commit is contained in:
@@ -266,7 +266,6 @@ class BackgroundStreamingHandler(private val activity: MainActivity) : MethodCal
|
||||
}
|
||||
|
||||
private fun startBackgroundExecution(streamIds: List<String>, requiresMic: Boolean) {
|
||||
activeStreams.clear()
|
||||
activeStreams.addAll(streamIds)
|
||||
streamsRequiringMic.retainAll(activeStreams)
|
||||
if (requiresMic) {
|
||||
|
||||
Reference in New Issue
Block a user