Skip to main content
Markdown

Live streams in mobile apps

Capacitor and Ionic​

Live streams work in the app as in a browser: the web view of the platform has WebRTC.

const calls = await rt.calls();
const show = await calls.stream( 'show:mugs' );
show.watch( video ); // the picture and its sound
show.on( 'message', ( m ) => addLine( m.from.name, m.text ) );
  • Going live from the app needs the camera and microphone, with the permission of the platform as for calls (calls).
  • Who is who is the streams() rule of your server (live streams).
  • The room client is among the files of the app, as for group calls (npx wordplus-realtime copy www/).

React Native​

Live streams in React Native come with calls, in a later version of the SDK: they need a WebRTC module (react-native-webrtc) the package does not bring yet. Until then, the app opens your page with the stream in a web view (react-native-webview).

Swift and Kotlin​

An app written in Swift or Kotlin watches and goes live natively: iOS and Android.