RoomPreview
This React Native component gives you an easy way to display the preview of a video room.
info
The RoomPreview component for React Native lives in a different npm package. Follow the installation instructions below.
Installation
Install the package (and its peer dependencies) using npm or yarn:
- npm
- Yarn
npm install @signalwire-community/react-native-room-preview react-native-webview
yarn add @signalwire-community/react-native-room-preview react-native-webview
Example
<RoomPreview
previewUrl={previewUrl}
loadingUrl="https://swrooms.com/swloading.gif"
style={{ height: 150 }}
/>
Full example:
import React from 'react';
import { SafeAreaView } from 'react-native';
import { RoomPreview } from '@signalwire-community/react-native-room-preview';
export default function App() {
return (
<SafeAreaView>
<RoomPreview
previewUrl={{ uri: 'https://my-preview-url' }}
loadingUrl={{ uri: 'https://swrooms.com/swloading.gif' }}
style={{ width: '50%' }}
/>
</SafeAreaView>
);
}