close method

Future<void> close()

Implementation

Future<void> close() async {
  if (lkPlatformIs(PlatformType.iOS)) {
    ReplayKitChannel.closeReplayKit();
  }
  audioTrack = null;
  await room?.dispose();
  await audioTrack?.stop();
  await _listener?.dispose();
  room?.removeListener(_onRoomDidUpdate);
  await publishStream(false);
}