I have path of the audio file like "sdcard://music/ABC.mp3" . How to get other details such as album, artist, duration etc from that path.
Asked
Active
Viewed 3,744 times
2 Answers
0
If you are using flutter_sound, there are utility methods which can give you the duration in milliseconds and some other metadata. From the package docs:
int duration = await flutterSoundHelper.duration( this._path[_codec.index] );
Map<dynamic, dynamic> info = await flutterSoundHelper.FFmpegGetMediaInformation( uri );

TM00
- 1,330
- 1
- 14
- 26
-
requires api 21 – cs guy Dec 09 '20 at 21:54
-
What are _path and _codec? – who-aditya-nawandar Mar 11 '22 at 16:52
-
If you read the docs of the package it should give you an explanation. – TM00 Mar 11 '22 at 20:37
-1
You can use fluter_music_player plugin to play, pause, album artist, duration etc. It's support both ios and android.
See Flutter Music Player this sample Music player flutter project using this plugin

Magesh Pandian
- 8,789
- 12
- 45
- 60
-
The project itself says 'This project is not implemented for ios yet.So wait for it or if you can contribute then please do help.' Careful when trying for IOS. – Henok Mar 12 '20 at 18:12