Surface the standardized ICE connection state to mobile clients.

This CL adds the callback on changes of the ICE connection state
following the standardized transitions
(https://www.w3.org/TR/webrtc/#dom-rtciceconnectionstate) to the
Android and the iOS SDKs.

Bug: None
Change-Id: I6133391fa54dd4e09016f29dddb85e4a0e270878
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/138181
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Reviewed-by: Alex Glaznev <glaznev@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28127}
This commit is contained in:
Qingsi Wang
2019-05-29 11:37:26 -07:00
committed by Commit Bot
parent 2dbc627aa0
commit 36e3147b21
8 changed files with 80 additions and 2 deletions

View File

@ -298,6 +298,14 @@ void PeerConnectionObserverJni::OnIceConnectionChange(
Java_IceConnectionState_fromNativeIndex(env, new_state));
}
void PeerConnectionObserverJni::OnStandardizedIceConnectionChange(
PeerConnectionInterface::IceConnectionState new_state) {
JNIEnv* env = AttachCurrentThreadIfNeeded();
Java_Observer_onStandardizedIceConnectionChange(
env, j_observer_global_,
Java_IceConnectionState_fromNativeIndex(env, new_state));
}
void PeerConnectionObserverJni::OnConnectionChange(
PeerConnectionInterface::PeerConnectionState new_state) {
JNIEnv* env = AttachCurrentThreadIfNeeded();

View File

@ -51,6 +51,8 @@ class PeerConnectionObserverJni : public PeerConnectionObserver {
PeerConnectionInterface::SignalingState new_state) override;
void OnIceConnectionChange(
PeerConnectionInterface::IceConnectionState new_state) override;
void OnStandardizedIceConnectionChange(
PeerConnectionInterface::IceConnectionState new_state) override;
void OnConnectionChange(
PeerConnectionInterface::PeerConnectionState new_state) override;
void OnIceConnectionReceivingChange(bool receiving) override;