openvidu-android: remove TODOs after 2.23.0
This commit is contained in:
parent
6e971ab6ee
commit
6389a9ec72
@ -79,28 +79,6 @@ public class Session {
|
||||
}
|
||||
|
||||
public PeerConnection createLocalPeerConnection() {
|
||||
// TODO: start block to remove after 2.23
|
||||
do {
|
||||
if (iceServers.isEmpty()) {
|
||||
if (iceServerUri != null) {
|
||||
IceServer.Builder iceServerBuilder;
|
||||
try {
|
||||
iceServerBuilder = IceServer.builder(iceServerUri);
|
||||
} catch (IllegalArgumentException e) {
|
||||
break;
|
||||
}
|
||||
if (iceServerUser != null) {
|
||||
iceServerBuilder.setUsername(iceServerUser);
|
||||
}
|
||||
if (iceServerPass != null) {
|
||||
iceServerBuilder.setPassword(iceServerPass);
|
||||
}
|
||||
iceServers.add(iceServerBuilder.createIceServer());
|
||||
}
|
||||
}
|
||||
} while (false);
|
||||
// TODO: end block to remove after 2.23
|
||||
|
||||
PeerConnection.RTCConfiguration config =
|
||||
new PeerConnection.RTCConfiguration(iceServers.isEmpty()
|
||||
? iceServersDefault
|
||||
@ -148,28 +126,6 @@ public class Session {
|
||||
}
|
||||
|
||||
public void createRemotePeerConnection(final String connectionId) {
|
||||
// TODO: start block to remove after 2.23
|
||||
do {
|
||||
if (iceServers.isEmpty()) {
|
||||
if (iceServerUri != null) {
|
||||
IceServer.Builder iceServerBuilder;
|
||||
try {
|
||||
iceServerBuilder = IceServer.builder(iceServerUri);
|
||||
} catch (IllegalArgumentException e) {
|
||||
break;
|
||||
}
|
||||
if (iceServerUser != null) {
|
||||
iceServerBuilder.setUsername(iceServerUser);
|
||||
}
|
||||
if (iceServerPass != null) {
|
||||
iceServerBuilder.setPassword(iceServerPass);
|
||||
}
|
||||
iceServers.add(iceServerBuilder.createIceServer());
|
||||
}
|
||||
}
|
||||
} while (false);
|
||||
// TODO: end block to remove after 2.23
|
||||
|
||||
PeerConnection.RTCConfiguration config =
|
||||
new PeerConnection.RTCConfiguration(iceServers.isEmpty()
|
||||
? iceServersDefault
|
||||
@ -261,24 +217,6 @@ public class Session {
|
||||
return this.token;
|
||||
}
|
||||
|
||||
// TODO: start block to remove after 2.23
|
||||
private String iceServerUri = null;
|
||||
private String iceServerUser = null;
|
||||
private String iceServerPass = null;
|
||||
|
||||
public void setIceServerUri(String uri) {
|
||||
iceServerUri = uri;
|
||||
}
|
||||
|
||||
public void setIceServerUser(String user) {
|
||||
iceServerUser = user;
|
||||
}
|
||||
|
||||
public void setIceServerPass(String pass) {
|
||||
iceServerPass = pass;
|
||||
}
|
||||
// TODO: end block to remove after 2.23
|
||||
|
||||
public void setIceServers(List<IceServer> iceServers) {
|
||||
this.iceServers = iceServers;
|
||||
}
|
||||
|
||||
@ -164,22 +164,6 @@ public class CustomWebSocket extends AsyncTask<SessionActivity, Void, Void> impl
|
||||
session.setIceServers(iceServers);
|
||||
}
|
||||
|
||||
// TODO: start block to remove after 2.23
|
||||
if (result.has("coturnIp") && result.has("coturnPort")) {
|
||||
final String turnHost = result.getString("coturnIp");
|
||||
final String turnPort = result.getString("coturnPort");
|
||||
session.setIceServerUri("turn:" + turnHost + ":" + turnPort);
|
||||
}
|
||||
if (result.has("turnUsername")) {
|
||||
final String turnUser = result.getString("turnUsername");
|
||||
session.setIceServerUser(turnUser);
|
||||
}
|
||||
if (result.has("turnCredential")) {
|
||||
final String turnPass = result.getString("turnCredential");
|
||||
session.setIceServerPass(turnPass);
|
||||
}
|
||||
// TODO: end block to remove after 2.23
|
||||
|
||||
PeerConnection localPeerConnection = session.createLocalPeerConnection();
|
||||
|
||||
localParticipant.setPeerConnection(localPeerConnection);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user