solomax commented on a change in pull request #131:
URL: https://github.com/apache/openmeetings/pull/131#discussion_r581660162
##########
File path:
openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
##########
@@ -504,9 +513,11 @@ public void onError(Throwable cause) throws Exception {
sipProcessor = Optional.empty();
}
- public void addCandidate(IceCandidate candidate, String uid) {
+ public void addIceCandidate(IceCandidate candidate, String uid) {
if (this.uid.equals(uid)) {
if (!(outgoingMedia instanceof WebRtcEndpoint)) {
Review comment:
this might be bad idea :(
`outgoingMedia` can be `null` in case if it is too early
and it might be `RtpEndpoint` in case `sipClient == true`
in latter case candidate shouldn't go to the queue
##########
File path:
openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
##########
@@ -149,6 +152,12 @@ public void onSuccess(Void result) throws Exception {
addSipProcessor(1);
} else {
outgoingMedia =
createEndpoint(sd.getSid(), sd.getUid(), true);
+ if (candidatesQueue.size() > 0) {
Review comment:
please use `isEmpty`
##########
File path:
openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
##########
@@ -82,6 +84,7 @@
private MediaPipeline pipeline;
private RecorderEndpoint recorder;
private BaseRtpEndpoint outgoingMedia = null;
+ private List<IceCandidate> candidatesQueue = new ArrayList<>();
Review comment:
Maybe it would be better to use some sort of concurrent `Queue` here?
##########
File path:
openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/KStream.java
##########
@@ -504,9 +513,11 @@ public void onError(Throwable cause) throws Exception {
sipProcessor = Optional.empty();
}
- public void addCandidate(IceCandidate candidate, String uid) {
+ public void addIceCandidate(IceCandidate candidate, String uid) {
Review comment:
this is matter of taste :)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]