cordova-plugin-media
cordova-plugin-media copied to clipboard
MediaError.MEDIA_ERR_ABORTED = 1 on Android?
Anyone knows what does it mean this error? iOS is working fine but Android is not playing the audio and showing this error.
I'm using Cordova 8, Cordova Android 7.1 and Plugin 5.0.2 I've tried M4A and MP3 files.
I have the same problem. Have you found a solution yet?
Running the application on Android 8, and fetch the audio from remote (Firebase) show media error code 1. But it's work fine when running on android 4.4
I met the same problem,the callback return err {code : 1} after play the remote mp3 file several times
mp3 file in assets folder, same problem, while mp3 downloaded from remote, works great.
Cordova 8.0, Android 9
Solved, you need to prefix it with: "/android_asset/www/assets/file.mp3" (i was putting it in the assets folder). While in ios you can just reference "assets/file.mp3".
Have a good day ;)
@giacomocerquone This really worked! Thanks
@giacomocerquone thanks for the solution, worked for me as well. Should this "/android_asset/www/asset/file.mp3" vs "asset/file.mp3" difference be in the documentation? Caught me out whilst using this library.
If someone pass by, i have the same problem but the problem occur with downloaded sound on my app, so android_assets/ is no use since it's saved somewhere like file:///data/user/0/com.[APPNAME].app/files/Audios/1320q.mp3
@FatManiac just inspect it with the android studio filebrowser or constantly keep calling filebrowser functions from cordova to search for your file
I have the same problem with a downloaded file in cordova 8.1.2 and android 8 file:///storage/emulated/0/download/fileName.mp3 directory should be fine but I'm getting the infamous code 1
After using the stop method, call the method release(), https://developer.android.com/reference/android/media/MediaPlayer
Hello I am also facing same problem when create media object from https url that time I get this error and in http url its working so please any one is help me Thanks in advance!
If someone pass by, i have the same problem but the problem occur with downloaded sound on my app, so android_assets/ is no use since it's saved somewhere like file:///data/user/0/com.[APPNAME].app/files/Audios/1320q.mp3
@FatManiac I'm stuck at the same problem. Did you found any solution yet?
@mayankkataria I'm also stuck on the same problem. Have you found any solution?
@mayankkataria Not sure if you solved it yet. But what ended up working for me was inserting android:requestLegacyExternalStorage="true within my <application> tag.