react-native-twilio-video-webrtc
react-native-twilio-video-webrtc copied to clipboard
Camera2Capturer + onCameraSwitched fix (Android)
This should be merged after #452 (I'm assuming this PR gets squashed on merge)
This adds Camera2Capturer based on https://github.com/twilio/video-quickstart-android/blob/master/quickstart/src/main/java/com/twilio/video/quickstart/util/CameraCapturerCompat.java
Tested on the following:
- (Simulator) Android 4.4 (Google APIs)
- (Simulator) Android 10.0 (Google APIs)
- (SM-A715F) Android 11
Changes:
- AndroidX was added
import androidx.annotation.NonNull;
import androidx.annotation.StringDef;
import androidx.annotation.RequiresApi;
ON_CAMERA_SWITCHEDnow happens on the camera listener'sonCameraSwitchedeventisBackCameraboolean also shows up ononConnectedevent- Addition and usage of Camera2Capturer by default based on API level
@marqroldan Ok I've merged in #452, you should be able to merge master into this branch now.
I think I haven't updated the types yet, I shall do that within 24 hours