stopRecordScreen property
Implementation
@override
Future<String> get stopRecordScreen {
final c = new Completer<String>();
this.mediaRecorder!.addEventListener("stop", (event) {
mediaRecorder = null;
this.stream!.getTracks().forEach((element) => element.stop());
this.stream = null;
final a = document.createElement("a") as AnchorElement;
final url = Url.createObjectUrl(
new Blob(List<dynamic>.from([recordedChunks]), mimeType));
document.body!.append(a);
a.style.display = "none";
a.href = url;
a.download = this.name;
a.click();
Url.revokeObjectUrl(url);
c.complete(this.name);
});
mediaRecorder!.stop();
return c.future;
}