neemssoni / rn-twilio-webrtc-app

0 stars 3 forks source link

How to connect multiple devices #2

Open tapannathvani opened 4 years ago

tapannathvani commented 4 years ago

Hello,

We have installed application in iOS & Android device. Now we are using the same access token which we have generated from https://www.twilio.com/console/video/project/testing-tools but nothing happened in devices..

Can you please help me to resolve this?

neemssoni commented 4 years ago

Have you created room? you need to create a room, and in my app.js I have room name "Room 1", same way you can create a room and for testing purpose for each device the access token will be different but room name will be same. For testing you can hardcode or you can send these from your service also. You need to keep "CLIENT IDENTITY" different for each device user while creating access tokens.

class App extends Component {
    state = {
      isAudioEnabled: true,
      isVideoEnabled: true,
      status: "disconnected",
      participants: new Map(),
      videoTracks: new Map(),
      roomName: "Room 1",
      token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTSzk4YzQzOTM4YjU3Zjk1MjkxZjhjMDMzYjM5MjY0MDBkLTE1ODQzNDA1NTIiLCJpc3MiOiJTSzk4YzQzOTM4YjU3Zjk1MjkxZjhjMDMzYjM5MjY0MDBkIiwic3ViIjoiQUNiY2Y4ZTU0ODM5YzAzMWE1M2IwYzI4NzllNTAyZWVlMyIsImV4cCI6MTU4NDM0NDE1MiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiTmVlbGFtIFRlc3QgMiIsInZpZGVvIjp7InJvb20iOiJSb29tIDEifX19.TPO8MLutlrlY0UbYAHUBFJNNWuUePrsKptv1JJRXoCg"
    };
tapannathvani commented 4 years ago

Have created the room with the same name.. using different CLIENT IDENTITY and using difference device token for each device. Now the problem is i am able to hear a voice of other member but not able to see her (i have iPhone).. and she is able to see me but not able to hear my voice (she has android). We have given all the permission for both platform.

tapannathvani commented 4 years ago

3 or more devices not working.. not able see 3rd person video

neemssoni commented 4 years ago

@tapannathvani, this code was written for one to one Video Call, if you want to create a one to many call, you need to change some of the code, need to have video trackSid for each participants and need to change the UI based on the Array of participant you need to render the participant view

neemssoni commented 4 years ago

Have created the room with the same name.. using different CLIENT IDENTITY and using difference device token for each device. Now the problem is i am able to hear a voice of other member but not able to see her (i have iPhone).. and she is able to see me but not able to hear my voice (she has android). We have given all the permission for both platform.

check for TwilioVideoParticipantView component