Skip to main content

Build with MediaSFU Expo

Use mediasfu-reactnative-expo@2.6.2 in Expo-managed React Native applications.

You can begin locally with restricted development credentials. Before sharing or releasing the app, move reusable Cloud credentials behind the secure backend guide.

npm install mediasfu-reactnative-expo@2.6.2

Build by operation​

TaskStart here
Secure room authority and callback boundariesExpo room operations
Prepare media, start microphone/camera, consume media, screen share, and leaveExpo operation table
Waiting, requests, moderation, and collaborationExpo collaboration
Device and failure recoveryRecovery and media controls
Rendered media responsibilitiesScreen and rendered media
Build a familiar call productProduct recipes
Check exact declarationsExpo API reference

Copy/paste starter​

import type { JoinRoomOnMediaSFUType } from 'mediasfu-reactnative-expo';

export const joinMediaSFURoom: JoinRoomOnMediaSFUType = async ({ payload }) => {
const response = await appFetch('https://api.example.test/rooms/join', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
});
if (!response.ok) throw new Error(`Join failed: ${response.status}`);
return response.json();
};

The prebuilt create/join screen checks for a credentials object before it calls your callback. Pass the placeholder values shown in the Expo room guide and inject both callbacks; never put a real MediaSFU key in an Expo bundle.

Before release​

Use physical devices to verify native permissions, microphone, camera, remote audio/video, screen sharing, app backgrounding, reconnect, leave, and cleanup. Repeat the call twice to catch stale state or tracks left by the first session.

More for Expo​