resumeVideoStreamPlay method
resume video stream play. Only supports ios
Implementation
Future<void> resumeVideoStreamPlay() async {
if (!value.isInitialized! || _isDisposed) {
throw CameraException(
'Uninitialized CameraController',
'resumeVideoStream was called on uninitialized CameraController',
);
}
if (!value.isStreamingVideoRtmp!) {
throw CameraException(
'No video is Streaming',
'resumeVideoStream was called when no video is Streaming.',
);
}
if (!value.isStreamingPaused) {
throw CameraException(
'No video is resume',
'resumeVideoStream was called when no video is Streaming.',
);
}
if (!Platform.isIOS) {
throw CameraException(
'Unsupported platforms.',
'resumeVideoStream Only supports Ios.',
);
}
try {
value = value.copyWith(isStreamingPaused:false);
await _channel.invokeMethod<void>(
'resumeStream',
<String, dynamic>{},
);
} on PlatformException catch (e) {
throw CameraException(e.code, e.message);
}
}