Implement JNI and objc implementation for icecandidateerror event

This CL adds the callback on ICE Candidate Error to the Android and
the iOS SDKs.

Spec: https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-onicecandidateerror

Bug: webrtc:13446
Change-Id: I6e511aaa80f1aa8f4310d8518d1144d97470cd7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239460
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35531}
This commit is contained in:
Jaehyun Ko
2021-11-30 19:01:43 +09:00
committed by WebRTC LUCI CQ
parent 63b97de330
commit d211098392
15 changed files with 233 additions and 0 deletions

View File

@ -46,6 +46,7 @@ import org.webrtc.DefaultVideoDecoderFactory;
import org.webrtc.DefaultVideoEncoderFactory;
import org.webrtc.EglBase;
import org.webrtc.IceCandidate;
import org.webrtc.IceCandidateErrorEvent;
import org.webrtc.Logging;
import org.webrtc.MediaConstraints;
import org.webrtc.MediaStream;
@ -1213,6 +1214,13 @@ public class PeerConnectionClient {
executor.execute(() -> events.onIceCandidate(candidate));
}
@Override
public void onIceCandidateError(final IceCandidateErrorEvent event) {
Log.d(TAG,
"IceCandidateError address: " + event.address + ", port: " + event.port + ", url: "
+ event.url + ", errorCode: " + event.errorCode + ", errorText: " + event.errorText);
}
@Override
public void onIceCandidatesRemoved(final IceCandidate[] candidates) {
executor.execute(() -> events.onIceCandidatesRemoved(candidates));