Revert of Add the url attribute to the IceCandidate (Java Wrapper) (patchset #4 id:120001 of https://codereview.webrtc.org/2690593002/ )
Reason for revert: Breaks AppRTCMobile interoperability. The ICE candidate URL shouldn't be signaled between endpoints, it's only there for informational purposes. Original issue's description: > Add the url attribute to the IceCandidate (Java Wrapper) > > The url of the ICE server is added to the IceCandiate class. > This can be used to tell which server this candidate was gathered from. > > BUG=webrtc:7128 > > Review-Url: https://codereview.webrtc.org/2690593002 > Cr-Original-Commit-Position: refs/heads/master@{#16593} > Committed:8586c8ee88> Review-Url: https://codereview.webrtc.org/2690593002 > Cr-Commit-Position: refs/heads/master@{#16615} > Committed:45efce01c7TBR=magjed@webrtc.org,zhihuang@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:7128 Review-Url: https://codereview.webrtc.org/2699533002 Cr-Commit-Position: refs/heads/master@{#16616}
This commit is contained in:
@ -187,7 +187,6 @@ public class DirectRTCClient implements AppRTCClient, TCPChannelClient.TCPChanne
|
||||
jsonPut(json, "label", candidate.sdpMLineIndex);
|
||||
jsonPut(json, "id", candidate.sdpMid);
|
||||
jsonPut(json, "candidate", candidate.sdp);
|
||||
jsonPut(json, "url", candidate.serverUrl);
|
||||
|
||||
if (roomState != ConnectionState.CONNECTED) {
|
||||
reportError("Sending ICE candidate in non connected state.");
|
||||
@ -337,13 +336,12 @@ public class DirectRTCClient implements AppRTCClient, TCPChannelClient.TCPChanne
|
||||
jsonPut(json, "label", candidate.sdpMLineIndex);
|
||||
jsonPut(json, "id", candidate.sdpMid);
|
||||
jsonPut(json, "candidate", candidate.sdp);
|
||||
jsonPut(json, "url", candidate.serverUrl);
|
||||
return json;
|
||||
}
|
||||
|
||||
// Converts a JSON candidate to a Java object.
|
||||
private static IceCandidate toJavaCandidate(JSONObject json) throws JSONException {
|
||||
return new IceCandidate(json.getString("id"), json.getInt("label"), json.getString("candidate"),
|
||||
json.getString("url"));
|
||||
return new IceCandidate(
|
||||
json.getString("id"), json.getInt("label"), json.getString("candidate"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,8 +115,8 @@ public class RoomParametersFetcher {
|
||||
offerSdp = new SessionDescription(
|
||||
SessionDescription.Type.fromCanonicalForm(messageType), message.getString("sdp"));
|
||||
} else if (messageType.equals("candidate")) {
|
||||
IceCandidate candidate = new IceCandidate(message.getString("id"),
|
||||
message.getInt("label"), message.getString("candidate"), message.getString("url"));
|
||||
IceCandidate candidate = new IceCandidate(
|
||||
message.getString("id"), message.getInt("label"), message.getString("candidate"));
|
||||
iceCandidates.add(candidate);
|
||||
} else {
|
||||
Log.e(TAG, "Unknown message: " + messageString);
|
||||
|
||||
@ -408,13 +408,12 @@ public class WebSocketRTCClient implements AppRTCClient, WebSocketChannelEvents
|
||||
jsonPut(json, "label", candidate.sdpMLineIndex);
|
||||
jsonPut(json, "id", candidate.sdpMid);
|
||||
jsonPut(json, "candidate", candidate.sdp);
|
||||
jsonPut(json, "url", candidate.serverUrl);
|
||||
return json;
|
||||
}
|
||||
|
||||
// Converts a JSON candidate to a Java object.
|
||||
IceCandidate toJavaCandidate(JSONObject json) throws JSONException {
|
||||
return new IceCandidate(json.getString("id"), json.getInt("label"), json.getString("candidate"),
|
||||
json.getString("url"));
|
||||
return new IceCandidate(
|
||||
json.getString("id"), json.getInt("label"), json.getString("candidate"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user