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 #20 (comment)
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.
Originally posted by @bulgarian-beast in #20 (comment)