Search…
In React Native
If you’re using React Native, you can embed Whereby rooms with just a few simple steps as laid out in this guide.
Before starting, you will need to add the corresponding permissions to be able to access both the camera and microphone as described in the Android and iOS sections.
Follow this guide to add and setup the react-native-webview library in your React Native project.
Finally, add the WebView component to your code, setup the properties and fill the room URL and parameters. Here is a short example:
React native
1
import React, { Component } from 'react';
2
import { WebView } from 'react-native-webview';
3
4
const roomUrl = ''; // Replace by your own
5
const roomParameters = '?needancestor&skipMediaPermissionPrompt';
6
7
export default class App extends Component {
8
render() {
9
return (
10
<WebView
11
startInLoadingState
12
source={{ uri: roomUrl + roomParameters }}
13
mediaPlaybackRequiresUserAction={false}
14
15
// iOS specific:
16
allowsInlineMediaPlayback
17
18
// Android specific:
19
javaScriptEnabled
20
domStorageEnabled
21
/>
22
);
23
}
24
}
Copied!
Copy link