Java 类org.webrtc.PeerConnection.IceConnectionState 实例源码

项目:nc-android-webrtcpeer    文件:PeerConnectionClient.java   
@Override
public void onIceConnectionChange(final PeerConnection.IceConnectionState newState) {
    executor.execute(new Runnable() {
        @Override
        public void run() {
            Log.d(TAG, "IceConnectionState: " + newState);
            if (newState == IceConnectionState.CONNECTED) {
                events.onIceConnected();
            } else if (newState == IceConnectionState.DISCONNECTED) {
                events.onIceDisconnected();
            } else if (newState == IceConnectionState.FAILED) {
                reportError("ICE connection failed.");
            }
        }
    });
}
项目:AppRTC-Android    文件:PeerConnectionClient.java   
@Override
public void onIceConnectionChange(final PeerConnection.IceConnectionState newState) {
  executor.execute(new Runnable() {
    @Override
    public void run() {
      Log.d(TAG, "IceConnectionState: " + newState);
      if (newState == IceConnectionState.CONNECTED) {
        events.onIceConnected();
      } else if (newState == IceConnectionState.DISCONNECTED) {
        events.onIceDisconnected();
      } else if (newState == IceConnectionState.FAILED) {
        reportError("ICE connection failed.");
      }
    }
  });
}
项目:AndroidRTC    文件:PeerConnectionClient.java   
@Override
public void onIceConnectionChange(final PeerConnection.IceConnectionState newState) {
    executor.execute(new Runnable() {
        @Override
        public void run() {
            Log.d(TAG, "IceConnectionState: " + newState);
            if (newState == IceConnectionState.CONNECTED) {
                events.onIceConnected();
            } else if (newState == IceConnectionState.DISCONNECTED) {
                events.onIceDisconnected();
            } else if (newState == IceConnectionState.FAILED) {
                reportError("ICE connection failed.");
            }
        }
    });
}
项目:voip_android    文件:PeerConnectionClient.java   
@Override
public void onIceConnectionChange(final PeerConnection.IceConnectionState newState) {
    executor.execute(new Runnable() {
        @Override
        public void run() {
            Log.d(TAG, "IceConnectionState: " + newState);
            if (newState == IceConnectionState.CONNECTED) {
                events.onIceConnected();
            } else if (newState == IceConnectionState.DISCONNECTED) {
                events.onIceDisconnected();
            } else if (newState == IceConnectionState.FAILED) {
                reportError("ICE connection failed.");
            }
        }
    });
}
项目:restcomm-android-sdk    文件:PeerConnectionClient.java   
@Override
public void onIceConnectionChange(final PeerConnection.IceConnectionState newState) {
  executor.execute(new Runnable() {
    @Override
    public void run() {
      Log.d(TAG, "IceConnectionState: " + newState);
      if (newState == IceConnectionState.CONNECTED) {
        events.onIceConnected();
      } else if (newState == IceConnectionState.DISCONNECTED) {
        events.onIceDisconnected();
      } else if (newState == IceConnectionState.FAILED) {
        reportError("ICE connection failed.");
      }
    }
  });
}
项目:AndroidRTC    文件:PeerConnectionTest.java   
@Override
public synchronized void onIceConnectionChange(IceConnectionState newState) {
  // TODO(bemasc): remove once delivery of ICECompleted is reliable
  // (https://code.google.com/p/webrtc/issues/detail?id=3021).
  if (newState.equals(IceConnectionState.COMPLETED)) {
    return;
  }

  if (expectedIceConnectionChanges.isEmpty()) {
    System.out.println(name + "Got an unexpected ice connection change " + newState);
    return;
  }

  assertEquals(expectedIceConnectionChanges.removeFirst(), newState);
}
项目:AndroidRTC    文件:PeerConnectionTest.java   
private static void shutdownPC(PeerConnection pc, ObserverExpectations expectations) {
  if (expectations.dataChannel != null) {
    expectations.dataChannel.unregisterObserver();
    expectations.dataChannel.dispose();
  }
  expectations.expectStatsCallback();
  assertTrue(pc.getStats(expectations, null));
  assertTrue(expectations.waitForAllExpectationsToBeSatisfied(TIMEOUT_SECONDS));
  expectations.expectIceConnectionChange(IceConnectionState.CLOSED);
  expectations.expectSignalingChange(SignalingState.CLOSED);
  pc.close();
  assertTrue(expectations.waitForAllExpectationsToBeSatisfied(TIMEOUT_SECONDS));
  expectations.expectStatsCallback();
  assertTrue(pc.getStats(expectations, null));
  assertTrue(expectations.waitForAllExpectationsToBeSatisfied(TIMEOUT_SECONDS));

  System.out.println("FYI stats: ");
  int reportIndex = -1;
  for (StatsReport[] reports : expectations.takeStatsReports()) {
    System.out.println(" Report #" + (++reportIndex));
    for (int i = 0; i < reports.length; ++i) {
      System.out.println("  " + reports[i].toString());
    }
  }
  assertEquals(1, reportIndex);
  System.out.println("End stats.");

  pc.dispose();
}
项目:AndroidRTC    文件:PeerConnectionTest.java   
public synchronized void expectIceConnectionChange(IceConnectionState newState) {
  expectedIceConnectionChanges.add(newState);
}
项目:webrtc-workshop    文件:PeerConnectionWrapper.java   
public void onIceConnectionChange(IceConnectionState iceConnectionState) {
    connectionStateCallback.onConnectionStateChange(iceConnectionState.toString());
}
项目:licodeAndroidClient    文件:LicodeConnector.java   
@Override
public void onIceConnectionChange(IceConnectionState arg0) {
}
项目:webrtcpeer-android    文件:NBMWebRTCPeer.java   
/**
 * WebRTC event which is triggered when ICE status has changed
 * @param state The new ICE connection state
 * @param connection The connection for which this event takes place
 */
void onIceStatusChanged(IceConnectionState state, NBMPeerConnection connection);
项目:webrtc-java    文件:Observer.java   
@Override
public synchronized void onIceConnectionChange(IceConnectionState newState) {

}