コード例 #1
0
        /// <summary>
        /// We've been given the green light to start the ICE candidate gathering process.
        /// This could include contacting external STUN and TURN servers. Events will
        /// be fired as each ICE is identified and as the gathering state machine changes
        /// state.
        /// </summary>
        public void StartGathering()
        {
            GatheringState = RTCIceGatheringState.gathering;
            OnIceGatheringStateChange?.Invoke(RTCIceGatheringState.gathering);

            _stunChecksTimer = new Timer(ProcessChecklist, null, 0, Ta);
        }
コード例 #2
0
ファイル: IceSession.cs プロジェクト: lordrak007/sipsorcery
        /// <summary>
        /// We've been given the green light to start the ICE candidate gathering process.
        /// This could include contacting external STUN and TURN servers. Events will
        /// be fired as each ICE is identified and as the gathering state machine changes
        /// state.
        /// </summary>
        public void StartGathering()
        {
            GatheringState = RTCIceGatheringState.gathering;
            OnIceGatheringStateChange?.Invoke(RTCIceGatheringState.gathering);
            ConnectionState = RTCIceConnectionState.checking;
            OnIceConnectionStateChange?.Invoke(RTCIceConnectionState.checking);

            _stunChecksTimer = new Timer(SendStunConnectivityChecks, null, 0, Ta);
        }
コード例 #3
0
 private RTCPeerConnection(IJSRuntime jsRuntime, JsObjectRef jsObjectRef, RTCConfiguration rtcConfiguration)
     : base(jsRuntime, jsObjectRef)
 {
     AddNativeEventListener("connectionstatechange", (s, e) => OnConnectionStateChanged?.Invoke(s, e));
     AddNativeEventListenerForObjectRef("datachannel", (s, e) => OnDataChannel?.Invoke(s, e),
                                        RTCDataChannelEvent.Create);
     AddNativeEventListenerForObjectRef("icecandidate", (s, e) => OnIceCandidate?.Invoke(s, e),
                                        RTCPeerConnectionIceEvent.Create);
     AddNativeEventListener("iceconnectionstatechange", (s, e) => OnIceConnectionStateChange?.Invoke(s, e));
     AddNativeEventListener("icegatheringstatechange", (s, e) => OnIceGatheringStateChange?.Invoke(s, e));
     AddNativeEventListener("negotiationneeded", (s, e) => OnNegotiationNeeded?.Invoke(s, e));
     AddNativeEventListener("signallingstatechange", (s, e) => OnSignallingStateChange?.Invoke(s, e));
     AddNativeEventListenerForObjectRef("track", (s, e) => OnTrack?.Invoke(s, e),
                                        RTCTrackEvent.Create);
 }
コード例 #4
0
 public void DidChangeIceGatheringState(Webrtc.RTCPeerConnection peerConnection,
                                        Webrtc.RTCIceGatheringState newState)
 {
     OnIceGatheringStateChange?.Invoke(this, EventArgs.Empty);
 }
コード例 #5
0
 public void OnIceGatheringChange(Webrtc.PeerConnection.IceGatheringState p0) =>
 OnIceGatheringStateChange?.Invoke(this, EventArgs.Empty);