Support running AppRTC without a TURN ICE server
The "ice_server_url" key is always present in AppRTC server's JSON response but may be empty if no ICE server is wanted. BUG=webrtc:7636 Review-Url: https://codereview.webrtc.org/2878673002 Cr-Commit-Position: refs/heads/master@{#18118}
This commit is contained in:
@ -139,7 +139,7 @@ public class RoomParametersFetcher {
|
||||
}
|
||||
}
|
||||
// Request TURN servers.
|
||||
if (!isTurnPresent && roomJson.has("ice_server_url")) {
|
||||
if (!isTurnPresent && !roomJson.optString("ice_server_url").isEmpty()) {
|
||||
LinkedList<PeerConnection.IceServer> turnServers =
|
||||
requestTurnServers(roomJson.getString("ice_server_url"));
|
||||
for (PeerConnection.IceServer turnServer : turnServers) {
|
||||
|
||||
Reference in New Issue
Block a user