We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
final path = await recorder!.stop(); final data = await fetchAudioData(path);
I tried both below functions. Every time I get 44 bytes in data. How do we get recorded audio bytes to pass in API for Safari browser?
Future<Uint8List> fetchAudioData(String url) async { html.HttpRequest request = await html.HttpRequest.request(url, responseType: 'arraybuffer'); return Uint8List.view(request.response); // return Uint8List(0); } Future<Uint8List> fetchAudioData1(String blobUrl) async { final response = await html.window.fetch(blobUrl); final blob = await response.blob(); final reader = html.FileReader(); final completer = Completer<Uint8List>(); reader.onLoadEnd.listen((event) { completer.complete(reader.result as Uint8List); }); reader.readAsArrayBuffer(blob); return completer.future; }
The text was updated successfully, but these errors were encountered:
I suggest you to use cross_file package for this.
cross_file
This should be easy as:
final path = await recorder.stop(); final file = XFile(path); final bytes = await file.readAsBytes();
Sorry, something went wrong.
Issue not resolved @llfbandit this solution does not work. I got 44 byte in bytes.
No branches or pull requests
I tried both below functions. Every time I get 44 bytes in data. How do we get recorded audio bytes to pass in API for Safari browser?
The text was updated successfully, but these errors were encountered: