Skip to content

Commit

Permalink
ft-audio-call-added
Browse files Browse the repository at this point in the history
ft-audio-call-added
  • Loading branch information
munezeromicha committed Jul 22, 2024
1 parent 5ee5d11 commit d7ce65f
Show file tree
Hide file tree
Showing 15 changed files with 1,038 additions and 619 deletions.
15 changes: 15 additions & 0 deletions api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const token: string = process.env.EXPO_PUBLIC_TOKEN;

export const createMeeting = async ({ token }: { token: string }): Promise<string> => {
const res = await fetch(`https://api.videosdk.live/v2/rooms`, {
method: "POST",
headers: {
authorization: `${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});

const { roomId } = await res.json();
return roomId;
}
14 changes: 11 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expo": {
"name": "matadors-rn-medica",
"slug": "matadors-rn-medica",
"slug": "medica-158",
"scheme": "com.medica",
"version": "1.0.0",
"orientation": "portrait",
Expand Down Expand Up @@ -70,6 +70,14 @@
{
"microphonePermission": "$(PRODUCT_NAME) would like to use your microphone for voice recording."
}
],
"@videosdk.live/expo-config-plugin",
[
"@config-plugins/react-native-webrtc",
{
"cameraPermission": "Allow $(PRODUCT_NAME) to access your camera",
"microphonePermission": "Allow $(PRODUCT_NAME) to access your microphone"
}
]
],
"experiments": {
Expand All @@ -80,7 +88,7 @@
"origin": false
},
"eas": {
"projectId": "3a6a34bd-fe90-43f9-9508-8c6cf7700ef6"
"projectId": "e682bd39-ab6e-4861-9be2-39cbe02bb93e"
}
},
"runtimeVersion": {
Expand All @@ -89,6 +97,6 @@
"updates": {
"url": "https://u.expo.dev/3a17d659-91e3-4105-837b-5f88bdee8d37"
},
"owner": "apiimperfect"
"owner": "actrox"
}
}
228 changes: 114 additions & 114 deletions app/(app)/Appointments/VideoCallAppointment/VideoCallRinging.tsx
Original file line number Diff line number Diff line change
@@ -1,122 +1,122 @@
import {
StyleSheet,
Text,
View,
ImageBackground,
Image,
Pressable,
TouchableOpacity,
} from "react-native";
import React from "react";
import { BackArrow, Speaker, Record, hungup,BigVideoIcon } from "@/components/Icons/Icons";
import { SvgXml } from "react-native-svg";
import Typography from "@/constants/Typography";
import { router } from "expo-router";
const VoiceCallRinging = () => {
return (
<>
<ImageBackground
style={styles.Background}
resizeMode="cover"
source={require("@/assets/images/MariaBackground.png")}
>
<View style={styles.backArrow}>
<TouchableOpacity onPress={()=> router.back()}>
<SvgXml xml={BackArrow} />
</TouchableOpacity>

</View>

<View style={styles.middlePart}>
<Image source={require("@/assets/images/Dr jenny.png")} style={{width: 200, height: 200, borderRadius: 100}}/>

<View style={styles.middleText}>
<Text style={[Typography.heading._3, { color: "#FFFFFF" }]}>
Dr. Maria Foose
</Text>
<Text style={[Typography.medium.xLarge, { color: "#FFFFFF" }]}>
Ringing...
</Text>
</View>
</View>

<View style={styles.Bottom}>
<TouchableOpacity style={styles.speaker}>
<SvgXml xml={Speaker} />
</TouchableOpacity>
StyleSheet,
Text,
View,
ImageBackground,
Image,
Pressable,
TouchableOpacity,
} from "react-native";
import React from "react";
import { BackArrow, Speaker, Record, hungup,BigVideoIcon } from "@/components/Icons/Icons";
import { SvgXml } from "react-native-svg";
import Typography from "@/constants/Typography";
import { router } from "expo-router";
const VoiceCallRinging = () => {
return (
<>
<ImageBackground
style={styles.Background}
resizeMode="cover"
source={require("@/assets/images/MariaBackground.png")}
>
<View style={styles.backArrow}>
<TouchableOpacity onPress={()=> router.back()}>
<SvgXml xml={BackArrow} />
</TouchableOpacity>

</View>

<View style={styles.middlePart}>
<Image source={require("@/assets/images/Dr jenny.png")} style={{width: 200, height: 200, borderRadius: 100}}/>

<TouchableOpacity style={styles.Video} onPress={()=> router.push('(app)/Appointments/VideoCallAppointment/VideoCall')}>
<SvgXml xml={BigVideoIcon} />
</TouchableOpacity>

<TouchableOpacity style={styles.Record}>
<SvgXml xml={Record} />
</TouchableOpacity>

<TouchableOpacity style={styles.hangup} onPress={()=> router.push('(app)/Appointments/Review/ReviewBlankform')}>
<SvgXml xml={hungup} />
</TouchableOpacity>
<View style={styles.middleText}>
<Text style={[Typography.heading._3, { color: "#FFFFFF" }]}>
Dr. Maria Foose
</Text>
<Text style={[Typography.medium.xLarge, { color: "#FFFFFF" }]}>
Ringing...
</Text>
</View>
</ImageBackground>
</>
);
};

export default VoiceCallRinging;

const styles = StyleSheet.create({
speaker:{
</View>

<View style={styles.Bottom}>
<TouchableOpacity style={styles.speaker}>
<SvgXml xml={Speaker} />
</TouchableOpacity>

<TouchableOpacity style={styles.Video} onPress={()=> router.push('(app)/Appointments/VideoCallAppointment/VideoCall')}>
<SvgXml xml={BigVideoIcon} />
</TouchableOpacity>

<TouchableOpacity style={styles.Record}>
<SvgXml xml={Record} />
</TouchableOpacity>

<TouchableOpacity style={styles.hangup} onPress={()=> router.push('(app)/Appointments/Review/ReviewBlankform')}>
<SvgXml xml={hungup} />
</TouchableOpacity>
</View>
</ImageBackground>
</>
);
};

export default VoiceCallRinging;

const styles = StyleSheet.create({
speaker:{
backgroundColor: '#F0F0F0',
borderRadius: 100,
padding: 20,
opacity: 0.6
},
Video:{
backgroundColor: '#F0F0F0',
borderRadius: 100,
padding: 20,
opacity: 0.6
},
Video:{
backgroundColor: '#F0F0F0',
borderRadius: 100,
padding: 20,
opacity: 0.6
},
Record:{
backgroundColor: '#F0F0F0',
borderRadius: 100,
padding: 23,
opacity: 0.6
},
hangup:{
backgroundColor: '#F75555',
borderRadius: 100,
padding: 20,

},
Bottom: {
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
gap: 20,
},
middlePart: {
justifyContent: "center",
alignItems: "center",
gap: 24,
},
middleText: {
justifyContent: "center",
alignItems: "center",
gap: 24,
},
backArrow: {
alignSelf: "flex-start",
marginTop: "5%"
},
Background: {
flex: 1,
justifyContent: "center",
alignItems: "center",
paddingTop: 24,
paddingBottom: 48,
paddingLeft: 24,
paddingRight: 24,
gap: 140,
},
});
Record:{
backgroundColor: '#F0F0F0',
borderRadius: 100,
padding: 23,
opacity: 0.6
},
hangup:{
backgroundColor: '#F75555',
borderRadius: 100,
padding: 20,

},
Bottom: {
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
gap: 20,
},
middlePart: {
justifyContent: "center",
alignItems: "center",
gap: 24,
},
middleText: {
justifyContent: "center",
alignItems: "center",
gap: 24,
},
backArrow: {
alignSelf: "flex-start",
marginTop: "5%"
},
Background: {
flex: 1,
justifyContent: "center",
alignItems: "center",
paddingTop: 24,
paddingBottom: 48,
paddingLeft: 24,
paddingRight: 24,
gap: 140,
},
});
Loading

0 comments on commit d7ce65f

Please sign in to comment.