-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.js
56 lines (55 loc) · 1.58 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React from "react";
import { SafeAreaView } from "react-native";
import colors from "../../styles/colors";
import {
MeetingConsumer,
MeetingProvider,
} from "@videosdk.live/react-native-sdk";
import MeetingContainer from "./MeetingContainer";
import { SCREEN_NAMES } from "../../navigators/screenNames";
export default function ({ navigation, route }) {
const token = route.params.token;
const meetingId = route.params.meetingId;
const micEnabled = route.params.micEnabled;
const webcamEnabled = route.params.webcamEnabled;
const name = route.params.name;
const meetingType = route.params.meetingType;
const defaultCamera = route.params.defaultCamera;
return (
<SafeAreaView
style={{ flex: 1, backgroundColor: colors.primary[900], padding: 12 }}
>
<MeetingProvider
config={{
meetingId: meetingId,
micEnabled: micEnabled,
webcamEnabled: webcamEnabled,
name: name,
notification: {
title: "Video SDK Meeting",
message: "Meeting is running.",
},
defaultCamera: defaultCamera,
}}
token={token}
>
<MeetingConsumer
{...{
onMeetingLeft: () => {
navigation.navigate(SCREEN_NAMES.Join);
},
}}
>
{() => {
return (
<MeetingContainer
webcamEnabled={webcamEnabled}
meetingType={meetingType}
/>
);
}}
</MeetingConsumer>
</MeetingProvider>
</SafeAreaView>
);
}