/** * Deprecated. PeerConnection constraints are deprecated. Supply values in rtcConfig struct * instead and use the method without constraints in the signature. */ @Nullable @Deprecated public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig, MediaConstraints constraints, PeerConnection.Observer observer) { long nativeObserver = PeerConnection.createNativePeerConnectionObserver(observer); if (nativeObserver == 0) { return null; } long nativePeerConnection = nativeCreatePeerConnection(nativeFactory, rtcConfig, constraints, nativeObserver); if (nativePeerConnection == 0) { return null; } return new PeerConnection(nativePeerConnection); }
public PeerConnection createPeerConnection(PeerConnection.RTCConfiguration rtcConfig, MediaConstraints constraints, PeerConnection.Observer observer) { long nativeObserver = nativeCreateObserver(observer); if (nativeObserver == 0) { return null; } long nativePeerConnection = nativeCreatePeerConnection(nativeFactory, rtcConfig, constraints, nativeObserver); if (nativePeerConnection == 0) { return null; } return new PeerConnection(nativePeerConnection, nativeObserver); }