pauseCopy method

Consumer pauseCopy()

Pauses receiving media and return new Instance of same Consumer.

Implementation

Consumer pauseCopy() {
  _logger.debug('pauseCopy()');

  if (closed) {
    _logger.error('pauseCopy() | Consumer closed');
    return this;
  }

  // paused = true;
  track.enabled = false;

  // Emit observer event.
  observer.safeEmit('pause');

  return copyWith(paused: true);
}