You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am developing a college chat app project can anyone tell me how can i built a voice calling feature in my react native app?
i explored a service called voximplant.com that do that How can i do in my case i have two users chatting the first user is me and i am getting my id from asyncstorage and the otheruser id coming coming like this otheruser._id Can anyone tell me how will things will work in my case?
import Voximplant from 'react-native-voximplant';
Voximplant.SDK.init({
bundleId: 'com.example.app',
authToken: 'auth_token',
});
// Connect to the Voximplant cloud
Voximplant.SDK.connect();
// Create two users
const user1 = 'user1';
const user2 = 'user2';
// Log in as user1
Voximplant.SDK.login(user1, user1);
// Log in as user2
Voximplant.SDK.login(user2, user2);
// Call user2 from user1
Voximplant.SDK.callUser(user2);
// Handle incoming calls from user1
Voximplant.SDK.on(Voximplant.Event.CallIncoming, (event) => {
const call = event.call;
if (call.headers['X-User-Id'] === user1) {
call.answer();
} else {
call.reject();
}
});
// Handle call events
Voximplant.SDK.on(Voximplant.Event.CallConnected, (event) => {
console.log('Call connected');
});
Voximplant.SDK.on(Voximplant.Event.CallDisconnected, (event) => {
console.log('Call disconnected');
});
Voximplant.SDK.on(Voximplant.Event.CallFailed, (event) => {
console.log('Call failed');
});
The text was updated successfully, but these errors were encountered:
i am developing a college chat app project can anyone tell me how can i built a voice calling feature in my react native app?
i explored a service called voximplant.com that do that How can i do in my case i have two users chatting the first user is me and i am getting my id from asyncstorage and the otheruser id coming coming like this otheruser._id Can anyone tell me how will things will work in my case?
The text was updated successfully, but these errors were encountered: