void Call() { callButton.interactable = false; Debug.Log("GetSelectedSdpSemantics"); var configuration = GetSelectedSdpSemantics(); pc1 = new RTCPeerConnection(ref configuration); Debug.Log("Created local peer connection object pc1"); pc1.OnIceCandidate = pc1OnIceCandidate; pc1.OnIceConnectionChange = pc1OnIceConnectionChange; pc1.OnNegotiationNeeded = pc1OnNegotiationNeeded; pc2 = new RTCPeerConnection(ref configuration); Debug.Log("Created remote peer connection object pc2"); pc2.OnIceCandidate = pc2OnIceCandidate; pc2.OnIceConnectionChange = pc2OnIceConnectionChange; pc2.OnTrack = pc2Ontrack; RTCDataChannelInit conf = new RTCDataChannelInit(true); dataChannel = pc1.CreateDataChannel("data", ref conf); audioStream = Audio.CaptureStream(); videoStream = cam.CaptureStream(1280, 720); RtImage.texture = cam.targetTexture; }
public void DeleteMediaStream(MediaStream stream) { NativeMethods.ContextDeleteMediaStream(self, stream.self); }
public void UnRegisterMediaStreamObserver(MediaStream stream) { NativeMethods.ContextRegisterMediaStreamObserver(self, stream.GetSelfOrThrow()); }
public void MediaStreamRegisterOnRemoveTrack(MediaStream stream, DelegateNativeMediaStreamOnRemoveTrack callback) { NativeMethods.MediaStreamRegisterOnRemoveTrack(self, stream.GetSelfOrThrow(), callback); }
public void DeleteMediaStream(MediaStream stream) { NativeMethods.ContextDeleteMediaStream(self, stream.GetSelfOrThrow()); }