Video freezes for a few seconds when flipping camera in React Native Twilio Video — any fix?

1 day ago 7
ARTICLE AD BOX

I'm using react-native-twilio-video-webrtc for video calls.

Whenever I flip the camera using flipCamera(), the local video freezes for 1–3 seconds before showing the new camera. Audio continues but the video is stuck during the flip.

Here is the simplest code to reproduce it:

import React, { useRef } from 'react'; import { View, Button } from 'react-native'; import TwilioVideo from 'react-native-twilio-video-webrtc'; export default function CallScreen() { const twilioRef = useRef(null); const handleFlip = () => { twilioRef.current?.flipCamera(); }; return ( <View style={{ flex: 1 }}> <TwilioVideo ref={twilioRef} onRoomDidConnect={() => console.log('connected')} /> <Button title="Flip Camera" onPress={handleFlip} /> </View> ); }

When I press the flip button, the video freezes for a few seconds. Is there any way to make the camera flip faster or avoid the visual freeze? Maybe some configuration I’m missing?

Note: this is an Expo pre-build project

Package versions:

@twilio/video-react-native-sdk: "^3.3.0", expo: "~53.0.22", react: "19.0.0", react-native: "0.79.6",
Read Entire Article