File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import kotlinx.serialization.json.Json
29
29
import timber.log.Timber
30
30
import java.util.concurrent.Executors
31
31
import java.util.concurrent.atomic.AtomicBoolean
32
- import kotlin.time.Duration.Companion.milliseconds
32
+ import kotlin.time.Duration.Companion.seconds
33
33
34
34
/* *
35
35
* This class manages the audio devices for a WebView.
@@ -246,15 +246,14 @@ class WebViewAudioManager(
246
246
private fun registerWebViewDeviceSelectedCallback () {
247
247
val webViewAudioDeviceSelectedCallback = AndroidWebViewAudioBridge (
248
248
onAudioDeviceSelected = { selectedDeviceId ->
249
- Timber .d(" Audio device selected in webview, id: $selectedDeviceId " )
250
249
previousSelectedDevice = listAudioDevices().find { it.id.toString() == selectedDeviceId }
251
250
audioManager.selectAudioDevice(selectedDeviceId)
252
251
},
253
252
onAudioPlaybackStarted = {
254
253
coroutineScope.launch(Dispatchers .Main ) {
255
254
// Even with the callback, it seems like starting the audio takes a bit on the webview side,
256
255
// so we add an extra delay here to make sure it's ready
257
- delay(500 .milliseconds )
256
+ delay(2 .seconds )
258
257
259
258
// Calling this ahead of time makes the default audio device to not use the right audio stream
260
259
setAvailableAudioDevices()
You can’t perform that action at this time.
0 commit comments