diff --git a/app/src/main/java/org/appspot/apprtc/RoomParametersFetcher.java b/app/src/main/java/org/appspot/apprtc/RoomParametersFetcher.java index 2ad10930..bfe09c45 100644 --- a/app/src/main/java/org/appspot/apprtc/RoomParametersFetcher.java +++ b/app/src/main/java/org/appspot/apprtc/RoomParametersFetcher.java @@ -208,8 +208,10 @@ private List iceServersFromPCConfigJSON(String pcConfi JSONObject server = servers.getJSONObject(i); String url = server.getString("urls"); String credential = server.has("credential") ? server.getString("credential") : ""; - PeerConnection.IceServer turnServer = - PeerConnection.IceServer.builder(url) + String username = server.has("username") ? server.getString("username") : ""; + PeerConnection.IceServer turnServer = + PeerConnection.IceServer.builder(url) + .setUsername(username) .setPassword(credential) .createIceServer(); ret.add(turnServer);