audio_waveforms
audio_waveforms copied to clipboard
Display waves and play content from web url like: https://example.com/example_audio.mp4
Hey guys, I love this project, could you explain me how to generate waves from an http audio url? I can't find any doc or example in the pub.dev link or by reading the sources.
To work around the problem I created a temporary file, but it would be nice to have a method to invoke fromUrl. I'm posting this code to help someone who would like to read voice messages from a database.
ElevatedButton(
onPressed: () async {
Response response = await get(Uri.parse(
"https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3"));
Uint8List bytes = response.bodyBytes;
File file = File('${appDirectory.path}/audio1.mp3');
if (response.statusCode == 200) {
await file.writeAsBytes(bytes);
playerController1.preparePlayer(file.path).then((value) {
if (mounted) {
setState(() {});
}
});
}
},
child: Text("Buf url"),
),
Originally posted by @bulgarian-beast in https://github.com/SimformSolutionsPvtLtd/audio_waveforms/issues/20#issuecomment-1151189174
This is really needed.
Any updates on this feature
this would be a great addition, any update?
This is needed
+1
+1
This is absolutely needed, especially for Flutter web where dart:io is not available!
+1 for sure
still waiting for this update
+1
+1
+1
+1
+1
+1
+1