When using _switchCamera method for camera mode change, fatal exception occurred.
This exception happened in Android S10 Plus device when switch from front to rear, from rear to front,
then from front to rear.
The latest version, 1.84.0 has the same issue.
AndroidRuntime: FATAL EXCEPTION: CaptureThread
AndroidRuntime: java.lang.NullPointerException: Attempt to get length of null array
AndroidRuntime: at org.webrtc.Camera2Enumerator.convertSizes(Camera2Enumerator.java:234)
AndroidRuntime: at org.webrtc.Camera2Enumerator.getSupportedSizes(Camera2Enumerator.java:147)
AndroidRuntime: at org.webrtc.Camera2Session.findCaptureFormat(Camera2Session.java:325)
AndroidRuntime: at org.webrtc.Camera2Session.start(Camera2Session.java:313)
AndroidRuntime: at org.webrtc.Camera2Session.(Camera2Session.java:296)
AndroidRuntime: at org.webrtc.Camera2Session.create(Camera2Session.java:274)
AndroidRuntime: at org.webrtc.Camera2Capturer.createCameraSession(Camera2Capturer.java:35)
AndroidRuntime: at org.webrtc.CameraCapturer$5.run(CameraCapturer.java:272)
AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:883)
AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100)
AndroidRuntime: at android.os.Looper.loop(Looper.java:237)
AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:67)
Is there anyone who knows other work-around solution instead of using _switchCamera?
Regards,
moneths