Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
0
 public void DidChangeSignalingState(Webrtc.RTCPeerConnection peerConnection,
                                     Webrtc.RTCSignalingState stateChanged)
 {
     OnSignallingStateChange?.Invoke(this, EventArgs.Empty);
 }
Ejemplo n.º 3
0
 public void OnSignalingChange(Webrtc.PeerConnection.SignalingState p0) =>
 OnSignallingStateChange?.Invoke(this, EventArgs.Empty);