resumeVideoStreaming method

Future<void> resumeVideoStreaming()

Resume video streaming after pausing.

This feature is only available on iOS and Android sdk 24+.

Implementation

Future<void> resumeVideoStreaming() async {
  if (!value.isInitialized! || _isDisposed) {
    throw CameraException(
      'Uninitialized CameraController',
      'resumeVideoStreaming was called on uninitialized CameraController',
    );
  }
  if (!value.isStreamingVideoRtmp!) {
    throw CameraException(
      'No video is recording',
      'resumeVideoStreaming was called when no video is streaming.',
    );
  }
  try {
    value = value.copyWith(isStreamingPaused: false);
    await _channel.invokeMethod<void>(
      'resumeVideoStreaming',
      <String, dynamic>{'textureId': _textureId},
    );
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}