Created
August 17, 2018 00:37
-
-
Save ktoraskartwilio/6257f4c2d4f42d5513756aa3ca59ee6b to your computer and use it in GitHub Desktop.
Twilio Video Android code snippet showing how to force TURN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void connectToRoom(String roomName) { | |
ConnectOptions connectOptions = new ConnectOptions.Builder(accessToken) | |
.roomName(roomName) | |
.audioTracks(localAudioTracks) | |
.videoTracks(localVideoTracks) | |
.iceTransportPolicy(IceTransportPolicy.RELAY) | |
.build(); | |
room = Video.connect(context, connectOptions, this); | |
} | |
private Room.Listener roomListener() { | |
return new Room.Listener() { | |
@Override | |
public void onConnected(Room room) { | |
Log.d(TAG,"Connected to " + room.getName()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to implement all the callback methods of
Room.Listener
.