private void OnTrack(RTCPeerConnection pc, RTCTrackEvent e) { trackInfos.Append($"{GetName(pc)} receives remote track:\r\n"); trackInfos.Append($"Track kind: {e.Track.Kind}\r\n"); trackInfos.Append($"Track id: {e.Track.Id}\r\n"); infoText.text = trackInfos.ToString(); }
private void OnTrack(RTCTrackEvent e) { // pc2Senders.Add(pc.AddTrack(e.Track, videoStream)); trackInfos.Append($"received remote track:\r\n"); trackInfos.Append($"Track kind: {e.Track.Kind}\r\n"); trackInfos.Append($"Track id: {e.Track.Id}\r\n"); infoText.text = trackInfos.ToString(); }
private void OnTrack(RTCPeerConnection pc, RTCTrackEvent e) { receiveStream = e.Streams.First(); receiveStream.OnRemoveTrack = ev => { ev.Track.Dispose(); }; trackInfos.Append($"{GetName(pc)} receives remote track:\r\n"); trackInfos.Append($"Track kind: {e.Track.Kind}\r\n"); trackInfos.Append($"Track id: {e.Track.Id}\r\n"); infoText.text = trackInfos.ToString(); }
private void PeerConnection_OnRemoveTrack(RTCTrackEvent evt) { OnRemoveTrack?.Invoke(evt); }