client-sdk-android
client-sdk-android copied to clipboard
Camera active indicator stays on when Room is disconnected by turning off the network connection
Describe the bug Camera active indicator remains on when Room is disconnected by turning off the internet on Android.
To Reproduce The behaviour reproduces in your sample app (e.g. sample-app-compose), too. Steps to reproduce the behavior using your sample app:
- Connect to a Room. Make sure Audio and video are working as expected (send and receive).
- Turn off the internet connection on Android.
- The Room is automatically disconnected on Android.
- The Android indicator that shows the camera is being used stays on indefinitely, until the app is closed by the user.
Expected behavior The camera indicator should turn off (camera should not be used anymore), as it does when the Room is disconnected in normal conditions.
Screenshots
Device Info:
- Device: Google Pixel 4A
- OS: Android 13, API 33
- LiveKit SDK version: 1.4.2
also replicated on a Google Pixel 4A with Android 14, API 34.
Additional context Android logs after turning off the internet: android.log
As a workaround, I tried to manually disable the camera when the event that the Room is disconnected is received:
room.localParticipant.setCameraEnabled(false)
or
room.localParticipant.videoTracks.forEach { it.second!!.stop() }
(or both) with no success.