Audio & video calling
Calling uses RealtimeX call_* signaling and VideoSDK for media. ChatNavigator already mounts CallProvider and ActiveCallScreen; the room header's voice / video buttons start calls.
Setup
- Install the calling peers (
@videosdk.live/react-native-sdk,@videosdk.live/react-native-incallmanager). - Call VideoSDK
register()once inindex.js. - Enable calling and pass the calls base:
import {configureCalling, configureChat} from '@realtimexsco/live-chat-react-native'; configureCalling({enabled: true}); // default true; false hides callingconfigureChat({callUri: 'https://realtimex.softwareco.com/api/v2' /* … */});- Native: Android
supportsPictureInPictureonMainActivity; iOS usage strings,audio/voip/picture-in-picturebackground modes; Broadcast extension for screen share — see Native configuration.
What you get
Incoming overlay with ringtone / vibration; outgoing, ringing and in-call screens; mute, camera, flip camera, speaker; screen share (with a "<name> wants to share their screen" banner and a Stop sharing action for the current presenter); whiteboard and cloud recording (when allowed); raise hand, emoji reactions, in-call chat, participants; draggable self-view; Picture-in-Picture; call history (CallsHistoryScreen), recordings (CallRecordingsScreen), and a join banner for live group calls.
Use your own call handling
configureChat({ ui: { chatRoom: { header: { onVideoCallPress: ({conversationId}) => { myVideoSdk.start(conversationId); return true; // skip the built-in call }, }, }, chatInfo: {onAudioPress: ctx => (myVoiceSdk.start(ctx.conversationId), true)}, },});Hide call buttons with showVoiceCall: false / showVideoCall: false. Hide the room menu's entries with roomOptions: {calls: false, recordings: false}.
Programmatic calls
import {callManager, useCallStore} from '@realtimexsco/live-chat-react-native'; await callManager.startOutgoingCall({ conversationId, mode: 'video', // 'audio' | 'video' peer: {name: displayName, avatar: avatarUrl}, isGroupCall: false,}); callManager.acceptIncomingCall();callManager.rejectIncomingCall();callManager.cancelOutgoingCall();callManager.endActiveCall();callManager.joinOngoingCall(callId); const uiStatus = useCallStore(s => s.uiStatus);// 'idle' | 'creating' | 'ringing-out' | 'incoming' | 'joining' | 'in-call' | 'ending'Without ChatNavigator, mount CallProvider inside ChatProvider, pass navigationRef, and register ActiveCallScreen in that navigator.
Call REST helpers: apiFetchCallHistory, apiFetchActiveCalls, apiJoinCall. Stores: useCallStore, useCallExtrasStore, useLiveCallsStore, resetCallExtras. Components: FloatingReactions, CallChatPanel, JoinCallBanner.
Picture-in-Picture details
- Without
CallPipModule, calls still work; PiP is skipped. - Mic / camera / end controls are hidden while PiP is active.
- When a remote participant is sharing, PiP shows the screen share; otherwise their camera, or their avatar when the camera is off.
Camera during PiP / iPad multitasking (iOS)
By default iOS pauses your camera when the app enters PiP, Split View or Slide Over. To keep it live, copy host-setup/patches/@videosdk.live+react-native-webrtc+0.0.22.patch into your app's patches/ folder and add "postinstall": "patch-package" to package.json.
To check on a device, filter the Xcode console for RTCCameraVideoCapturer and CallPipModule; you should see Multitasking camera access supported=1 enabled=1.
Screen sharing at a glance
Only one person can present at a time. When someone else asks to share, the presenter sees "<name> wants to share their screen" with a Stop sharing button.