stopRtmpAndRecording method
Stops a previously started rtmp recording or stream. See startRtmpOrRecording for starting.
hmsActionResultListener - hmsActionResultListener
is the callback that would be called by SDK in case of success or failure.
Implementation
Future<void> stopRtmpAndRecording(
{HMSActionResultListener? hmsActionResultListener}) async {
var result =
await PlatformService.invokeMethod(PlatformMethod.stopRtmpAndRecording);
if (hmsActionResultListener != null) {
if (result == null) {
hmsActionResultListener.onSuccess(
methodType: HMSActionResultListenerMethod.stopRtmpAndRecording);
} else {
hmsActionResultListener.onException(
methodType: HMSActionResultListenerMethod.stopRtmpAndRecording,
hmsException: HMSException.fromMap(result["error"]));
}
}
}