openvidu-server: MediaEndpoint fix

pull/391/head
pabloFuente 2020-02-14 23:03:37 +01:00
parent ac2f46ac2d
commit 1713d79b4a
1 changed files with 2 additions and 6 deletions

View File

@ -33,7 +33,6 @@ import org.kurento.client.IceCandidate;
import org.kurento.client.ListenerSubscription; import org.kurento.client.ListenerSubscription;
import org.kurento.client.MediaElement; import org.kurento.client.MediaElement;
import org.kurento.client.MediaPipeline; import org.kurento.client.MediaPipeline;
import org.kurento.client.PassThrough;
import org.kurento.client.PlayerEndpoint; import org.kurento.client.PlayerEndpoint;
import org.kurento.client.RtpEndpoint; import org.kurento.client.RtpEndpoint;
import org.kurento.client.SdpEndpoint; import org.kurento.client.SdpEndpoint;
@ -472,11 +471,8 @@ public abstract class MediaEndpoint {
throw new OpenViduException(Code.MEDIA_WEBRTC_ENDPOINT_ERROR_CODE, throw new OpenViduException(Code.MEDIA_WEBRTC_ENDPOINT_ERROR_CODE,
"Can't register event listener for null WebRtcEndpoint (ep: " + endpointName + ")"); "Can't register event listener for null WebRtcEndpoint (ep: " + endpointName + ")");
} }
webEndpoint.addOnIceCandidateListener(new EventListener<OnIceCandidateEvent>() { webEndpoint.addOnIceCandidateListener(event -> {
@Override owner.sendIceCandidate(senderPublicId, endpointName, event.getCandidate());
public void onEvent(OnIceCandidateEvent event) {
owner.sendIceCandidate(senderPublicId, endpointName, event.getCandidate());
}
}); });
} }