dispose method

Future<void> dispose()

Implementation

Future<void> dispose() async {
  try {
    await audioTrack?.stop();
    await videoTrack?.stop();
    await mediaStream?.dispose();
    await renderer.dispose();
    await peerConnection?.close();
  } catch (e) {
    _logger.info('Dispose PeerConnection: $e');
  }
}