hey team, Got a few questions regarding the livek...
# sdk-native
c
hey team, Got a few questions regarding the livekit-react-native SDK is androidPIP planned? The iosPIP works great, but as of now we are still working with our native module for PIP on android Also, will you be adding the ability to handle PIP-lifecycle-events? Particularly the wasInterruptedNotification, to be able to disable the camera when PIP is dismissed, right now the camera just freezes.
✅ 1
p
for android PIP, that’s more of a client-side thing to implement, as it requires changing the activity to declare that it’s PIP capable, and then changing the layout to what you want it to contain when entering/exiting PIP mode. unfortunately I don’t think we can implement a self-contained pip experience like on iOS. that said, I have tried out using this library in the past, and although it’s 4 years old now, seemed to work fine. if you’re on expo, this library seems much more up to date: https://github.com/EdgarJMesquita/expo-pip ---- for iOS, I think you might want to look into turning on
multitaskingCameraAccess
, which is required for keeping the camera on in the background/pip. check out our installation instructions for iOS. https://github.com/livekit/client-sdk-react-native?tab=readme-ov-file#ios
c
thanks for that @plain-wall-1315! In regards to the background camera, yes multitaskingCameraAccess works for when PIP is active, but I believe when PIP is hidden on iOS, the camera stream is forcibly stopped (iOS security related), which is currently not handled, and so the stream freezes. I believe this could be fixed by listenning for the wasInterruptedNotification in PIP-lifecycle-events, and disabling the camera setting localParticipant.setCameraEnabled(false)