Open GabrielRegis opened 4 years ago
It works fine for me, here is the code I use:
void playword(String file) { _assetsAudioPlayer.open( Playlist(audios: [Audio("assets/$file.mp3"), Audio("assets/audio/blank.mp3")]), loopMode: LoopMode.playlist); }
Note: I do not have await in my code, but I do have loopmode as I want to audio to repeat. I suspect the error in your code is the await keyword.
Hope it helps!
Hey @johnareid54, thanks for helping me out. I tried your example (Without using the await keyword), but unfortunately, it still not working :( Any guesses?
Note: I just updated to the new assets_audio_player version (^2.0.13).
Sorry @GabrielRegis, I have been using AssetsAudioPlayer for a few months now, and have been very pleased with it.
All I can suggest is make sure the player can play each file separately, I don't know what happens if you put in a file name that does not exist, does it go unto the next file or does it stop? I notice you are using IOS and the second file is called "exampleB.mp3" with an upper case B. IOS is case sensitive so in my app I always use lowercase only to avoid the problem.
I'm experiencing the same playlist issue on iOS.
OK, I just run the IOS simulator on my Macbook (normally I just use the web version as it is faster), eight minutes later I was able to test it out. The app played the first audio file and then stopped, it would not play any further audio files. No messages were shown in the debug window.
This is very disappointing, I know it worked last time I tried the simulator with version 2.0.9. There was a bug then, in that IOS was not reporting when an audio file finished, but the looping method worked. {see closed issue 329)
@GabrielRegis can you test this with latest version of this plugin ?
@kalismeras61 I just updated the lib to the new version (^2.0.13+1), it's still not working properly :(
I am having the same problem on audio.network. The list plays ok, but the next() does not play next and no exception is thrown. Otherwise, very happy with this package.
iPhone SE emulator, IOS 14.2
startPlayList(List
// Stop any currently playing players
stopAllPlayers();
playListPlayer.open(
Playlist(
audios: audioList
),
//loopMode: LoopMode.playlist //loop the full playlist
);
}
stopPlayList(){ print("playlist stop"); playListPlayer.stop(); }
nextPlayList(){ print("playlist next"); try { playListPlayer.next(); } catch (e){ print("error for playlist next: " + e.toString()); } }
any news on this? having the same issue here using latest ^2.0.13. it worked in 2.0.10.
i've reverted #377 and it's now working fine.
please check why #377 causes this issue.
@florent37 @kalismeras61 @Timus23
Flutter Version
My version : Flutter 1.23.0-18.1.pre
Lib Version
My version : ^2.0.12
Platform (Android / iOS / web) + version
Platform : iOS - 14
Describe the bug
After the first audio is completed from an assets playlist, the next audio never plays.
Small code to reproduce