flutter_audio_waveforms icon indicating copy to clipboard operation
flutter_audio_waveforms copied to clipboard

How to load music from document directory

Open islom9797 opened this issue 2 years ago • 0 comments

Thank you for so amazing package How to load from document directory.At the moment work just load mp3 files from asset folder but I want to load music from document directory(data/user/0/com.example.moms_life_ekg/app_flutter/record/test_1687338283864.mp3 like this) but AudioCache.load and AudioCache.loadAsFile does not work and giving error like this RROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Unable to load asset: "assets//data/user/0/com.example.moms_life_ekg/app_flutter/record/test_1687337809743.mp3". E/flutter (29741): The asset does not exist or has empty data. E/flutter (29741): #0 PlatformAssetBundle.load. (package:flutter/src/services/asset_bundle.dart:254:9) E/flutter (29741): E/flutter (29741): #1 AudioCache.fetchToMemory (package:audioplayers/src/audio_cache.dart:89:22) E/flutter (29741): E/flutter (29741): #2 AudioCache.load (package:audioplayers/src/audio_cache.dart:115:31) E/flutter (29741): E/flutter (29741): Please can you explain how to load and play music from document directory thanks

islom9797 avatar Jun 21 '23 09:06 islom9797