Headless Mode
Headless mode is the right path when you want MediaSFU workflows, socket/state behavior, and shared business logic without adopting the default UI layout.
When to use headless mode
- You want your own app shell and presentation layer.
- You need the MediaSFU runtime behavior, but not the default UI.
- You are integrating mediasfu-shared directly or using a framework SDK in a logic-first way.
Headless controls by framework
| Framework | Headless switch | Pre-join bypass | Helper handoff | Best starting point |
|---|---|---|---|---|
| ReactJS | returnUI={false} | noUIPreJoinOptions | updateSourceParameters | ReactJS SDK |
| Angular | [returnUI]="false" | [noUIPreJoinOptions] | updateSourceParameters output | Angular SDK |
| React Native | returnUI={false} | noUIPreJoinOptions | updateSourceParameters | React Native SDK |
| React Native Expo | returnUI={false} | noUIPreJoinOptions | updateSourceParameters | Expo SDK |
| Vue | returnUI={false} | noUIPreJoinOptions | updateSourceParameters | Vue SDK |
| Shared | n/a | n/a | direct methods, consumers, sockets | mediasfu-shared |
All UI SDKs now expose the same basic headless pattern: disable default rendering with returnUI={false} or the framework equivalent, provide noUIPreJoinOptions if you want to skip the built-in wizard, then capture live helpers via updateSourceParameters so your custom shell can drive the workflow.
Current best starting points
- mediasfu-shared for framework-agnostic integrations.
- MediaSFU ReactJS when you want the richest reference behavior.
- MediaSFU React Native Expo when you want to study the mode toggles shown in the reference apps.
Framework notes
- ReactJS: the reference behavior is strongest here, so use it to understand the full helper surface before porting a custom shell to another UI SDK.
- Angular: headless mode is particularly useful when you want to keep Angular routing, DI, and templates while outsourcing MediaSFU runtime logic.
- React Native / Expo: validate headless flows on a physical device before treating them as closed because permission and media-capture behavior can differ from simulators.
- Vue: this is a good path when you want composition-friendly state handling while still preserving MediaSFU socket and consumer behavior.
- Shared: choose this when you are building a wrapper or framework integration rather than adapting a bundled UI package.
Implementation sequence
- Validate a standard join flow first.
- Flip
returnUIoff and wirenoUIPreJoinOptionsonly after the default prebuilt path is known-good. - Capture and store the helper surface from
updateSourceParametersbefore replacing any visible screens. - Validate translation, board sync, screen share, and receive-flow behavior in the target app environment.
- Use the package SDK page for the framework-specific examples and prop signatures.
What to read next
- ReactJS SDK
- Angular SDK
- React Native SDK
- React Native Expo SDK
- Vue SDK
- Media lifecycle for the helper-bundle mental model
Related paths
- Need partial customization instead? Use UI overrides.
- Need to replace whole surfaces? Use Custom component replacement.