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
| Task | Start here |
|---|---|
| Secure room authority and callback boundaries | Expo room operations |
| Prepare media, start microphone/camera, consume media, screen share, and leave | Expo operation table |
| Waiting, requests, moderation, and collaboration | Expo collaboration |
| Device and failure recovery | Recovery and media controls |
| Rendered media responsibilities | Screen and rendered media |
| Build a familiar call product | Product recipes |
| Check exact declarations | Expo 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.