react-native-calling
Getting started
$ npm install react-native-calling --save
Required packages install
$ npm install native-base uuid react-native-incall-manager react-native-webrtc react-native-websocket --save
1.) In android/app/src/main/AndroidManifest.xml
add these permissions
<uses-permission android:name="android.permission.CAMERA" /><uses-feature android:name="android.hardware.camera" /><uses-feature android:name="android.hardware.camera.autofocus"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/><uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /><uses-permission android:name="android.permission.RECORD_AUDIO" /><uses-permission android:name="android.permission.WAKE_LOCK" /><uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Usage
App.js only use
;;; { superprops; thisstate = loading: true localVideo: null clientID: null username: null ; } async { let localVideo = await ; this; this; signalingConnection; } onSignalingMessage = async { } { if thisstateloading return <View style= flex: 1 justifyContent: "center" alignItems: "center" > <Text>loading...</Text> </View> return <> <Call localStream=thisstatelocalVideo signalingConnection=signalingConnection clientID=thisstateclientID username="your App user username (unique)" /> <View style= flex: 1 justifyContent: "center" alignItems: "center" > <Text>your code only use Call component</Text> </View> </> ; }
online userlist live
; signalingConnection; { superprops; thisstate = loading: true userList: ; } async { signalingConnection; } onSignalingMessage = async { } { return <View style= flex: 1 justifyContent: "center" alignItems: "center" > <Text>Your code</Text> </View> }
online userlist get
; await ; // user this function
call button
; await ;