<Android>Does this library requires 2 egl contexts for single video stream(RTCView)?

In my android application, I couldn’t able to render more than 14 cameras on a single screen, beyond that my app crashed with an EGL context creation failed error. I believe this is a known defect in the chromium webrtc library when we have more than 30EGLcontext created.

just curious do we need 2 contexts for each webcam stream (RTCView) in the RN webrtc library, is there any workaround to increase the number of webcam stream support in a single screen?

2 Likes

Not sure if you still need help. But we had similar issue in react-native-webrtc library. We did 2 fixes for that.

  1. Released streams once we switch off webcam
  2. Fixed one issue in the library which is now merged as well. Here is the reference to PR. May be you can do similar fix in Android native library. fix "Failed to create EGL context" exception by poorvasingh · Pull Request #1104 · react-native-webrtc/react-native-webrtc · GitHub