Open Ajai-Joseph opened 6 months ago
Can you please paste the exact error message being thrown?
Same issue here:
FlutterRingtonePlayer().play(fromFile: filePath);
results in
Please specify the sound source.
It is caused by
if (fromAsset == null && android == null && ios == null) { throw "Please specify the sound source."; }
in flutter_ringtone_player/flutter_ringtone_player_method_channel.dart Version flutter_ringtone_player: ^4.0.0+2
I have stored an audio file in app's document directory (getting the path with 'getApplicationDocumentsDirectory()').
When I tried to play this audio from this path, i am getting the exception: "Please specify the sound source." the filePath is like, '/data/user/0/......../app_flutter/alarm_sound.mp3'
try { await FlutterRingtonePlayer().play( fromFile: filePath ); } catch (e) { log(e.toString()); }
When I tried to play from assets using 'fromAsset', its working, but can't play this file which is stored in the app