public void Dispose() { try { // Unable to exit process until DataChannel is removed/disposed, // and this throws internally (at least in 2.0 version). PeerSession?.RemoveDataChannel(CaptureChannel); } catch { } PeerSession.Transceivers.RemoveAll(x => true); Disposer.TryDisposeAll(Transceiver?.LocalVideoTrack, VideoSource, PeerSession); GC.SuppressFinalize(this); }
public void Dispose() { try { // Unable to exit process until DataChannel is removed/disposed, // and this throws internally (at least in 2.0 version). PeerSession?.RemoveDataChannel(CaptureChannel); } catch { } Disposer.TryDisposeAll(new IDisposable[] { PeerSession, Transceiver?.LocalVideoTrack, VideoSource }); }
public void Dispose() { try { Transceiver?.LocalVideoTrack?.Dispose(); VideoSource?.Dispose(); try { // Unable to exit process until DataChannel is removed/disposed, // and this throws internally (at least in 2.0 version). PeerSession?.RemoveDataChannel(CaptureChannel); } catch { } PeerSession?.Dispose(); } catch { } }