dispose method

  1. @override
void dispose()

Implementation

@override
void dispose() {
  _negotiator?.cleanup();
  _negotiator = null;

  _stopMediaDevice();

  _localStream = null;
  _remoteStream = null;

  // TODO: set stream to null when done.
  // if (this.options && this.options._stream) {
  // 	this.options._stream = null;
  // }

  if (!open) {
    return;
  }

  open = false;
}