stop method
Stop streaming.
Implementation
Future<String?> stop() async {
if (!(value.isInitialized ?? false) || _isDisposed) {
throw AudioStreamingException(
'Uninitialized CameraController',
'stopVideoStreaming was called on uninitialized CameraController',
);
}
if (!(value.isRecording ?? false)) {
throw AudioStreamingException(
'No video is recording',
'stopVideoStreaming was called when no video is streaming.',
);
}
try {
value = value.copyWith(isRecording: false);
final reply = await channel.stop();
return reply is Map ? reply['path'] : null;
} on PlatformException catch (e) {
throw AudioStreamingException(e.code, e.message);
}
}