Audio and video calling overview
OpenIM React Native SDK guide for audio and video calling.
OpenIM React Native SDK provides calling signaling APIs for starting and handling call invitations, querying room information, and synchronizing call state. It handles call business signaling only; it does not capture or play audio and video, connect to media rooms, or render call UI.
After starting or accepting a call, the SDK returns room credentials such as roomID, token, and liveURL. The application passes these credentials to a real-time audio and video media engine to join the call room, and handles device permissions, media tracks, weak-network strategy, and UI state itself.
Call flow
- Call
signalingInvite()to start a one-to-one call, orsignalingInviteInGroup()to start a group call. - Invitees receive the call invitation through
OnReceiveNewInvitationand choose whether to accept or reject it. - After accepting, call
signalingAccept()and use the returned room credentials to join the call room. - During the call, update the call UI based on invitation status, participant status, media-stream status, and custom signals.
- The inviter can cancel an invitation that has not connected; call participants can hang up an established call.
Core data
| Data | Description |
|---|---|
RtcInvite | Call invitation containing the inviter, invitees, group, room, media type, timeout, and session type. |
RtcInviteResults | The roomID, token, and liveURL returned after starting or accepting a call, or querying room credentials. |
CallingRoomData | Room ID, invitation information, and participant information returned when querying by group. |
OnReceiveNewInvitationPayload | Event parameter for a received call invitation, containing invitation, optional offlinePushInfo, and participant information. |
customData and custom signals are both application-defined strings. Use JSON or another format required by the application protocol.
Call state
After calling the start, accept, reject, cancel, or hang-up API, update the UI for the current action from the corresponding result. Call state from other users or devices is received through events. Use roomID to distinguish calls; use both roomID and userID to distinguish participant state.
For invitation lifecycle, participant room-entry and room-exit, and media-stream listeners, see Handle call events. For custom-signal listeners, see Send a custom signal.
Browse by task
| Task | Page |
|---|---|
| Start a one-to-one or group call | Start a one-to-one call, Start a group call |
| Accept or reject an invitation | Accept a call, Reject a call |
| Cancel an invitation or hang up a call | Cancel a call invitation, Hang up a call |
| Query a room or restore a pending invitation | Get a group call room, Get room credentials, Restore a pending invitation |
| Handle events and custom signals | Handle call events, Send a custom signal |
Was this page helpful?