resumeCopy method

Producer resumeCopy()

Resumes sending media and return new Instance of same Producer.

Implementation

Producer resumeCopy() {
  _logger.debug('resumeCopy()');

  if (closed) {
    _logger.error('resumeCopy() | Producer closed');

    return this;
  }

  // paused = false;

  if (disableTrackOnPause) {
    track.enabled = true;
  }

  if (zeroRtpOnPause) {
    safeEmitAsFuture('@replacetrack', {
      '_track': track,
    }).catchError((error, stackTrace) {});
  }

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

  return copyWith(paused: false);
}