I have already posted this question on the react-native-webrtc community but without much luck so far, so here it goes.
I’m developing a mobile app that simply streams video from the back camera using react-native-webrtc. This app works wonders for every phone model except for some select Samsung devices with Android version 8.0, 8.1 and 9.0 so far.
Detailed device model list:
Galaxy A5(2017) (a5y17lte)
Galaxy S7 (herolte)
Galaxy S7 edge (hero2lte)
Galaxy Tab A (2016) (gtaxllte)
Galaxy Note8 (greatlte)
Galaxy A6 (a6lte)
Galaxy J6 (j6lte)
Galaxy J7(2016) (j7xelte)
Galaxy J5 Prime(2016) (on5xelte)
When getUserMedia is called I’m getting the following error:
java.lang.RuntimeException: at org.webrtc.CameraCapturer.<init>(CameraCapturer.java:224) at org.webrtc.Camera2Capturer.<init>(Camera2Capturer.java:24) at org.webrtc.Camera2Enumerator.createCapturer(Camera2Enumerator.java:89) at com.oney.WebRTCModule.VideoCaptureController.createVideoCapturer(VideoCaptureController.java:210) at com.oney.WebRTCModule.VideoCaptureController.<init>(VideoCaptureController.java:57) at com.oney.WebRTCModule.GetUserMediaImpl.createVideoTrack(GetUserMediaImpl.java:85) at com.oney.WebRTCModule.GetUserMediaImpl.getUserMedia(GetUserMediaImpl.java:174) at com.oney.WebRTCModule.WebRTCModule.lambda$getUserMedia$2$WebRTCModule(WebRTCModule.java:485) at com.oney.WebRTCModule.-$$Lambda$WebRTCModule$C_Gitx4KOYySlWXaI1K4M1yoJoA.run at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)
I have no way of debugging this myself as I do not own any Samsung phone, so far only a colleague has been able to help with a J5 Prime running Android 8.0 but since we’re in different countries I cannot get my hands on the device.
The app is running with:
- “react”: “16.9.0”
- “react-native”: “0.61.5”
- “react-native-webrtc”: “1.75.3”
I’ve tried reverting to react-native-webrtc 1.69.1, 1.69.2, 1.75.0, 1.75.2 without any improvements.
Thank you so much in advance for all your help.