Flutter-AssetsAudioPlayer icon indicating copy to clipboard operation
Flutter-AssetsAudioPlayer copied to clipboard

Audio Player Bug : i can only play but i cant pause or stop

Open code5717 opened this issue 6 years ago • 3 comments

Flutter Version

My version : 1.18

Lib Version

My version : latest

Platform (Android / iOS / web) + version

Platform : Android api 28

Describe the bug

The Audio Player works but i cant pause nor stop it

My Code HERE https://github.com/Airbus5717/ath-app

code5717 avatar Jun 03 '20 15:06 code5717

you're using multiple players, that's why

line 35 : final assetsAudioPlayer = AssetsAudioPlayer();

line 69 : another player

 AssetsAudioPlayer.newPlayer().open(

                Audio("assets/Audio/" + suraFileNameFinal + '.mp3'),
                //autoPlay: true,
                showNotification: true,
              );

florent37 avatar Jun 03 '20 16:06 florent37

just change AssetsAudioPlayer.newPlayer() to assetsAudioPlayer

assetsAudioPlayer.open(

                Audio("assets/Audio/" + suraFileNameFinal + '.mp3'),
                //autoPlay: true,
                showNotification: true,
              );

florent37 avatar Jun 03 '20 16:06 florent37

Thank you for your help sir.

code5717 avatar Jun 05 '20 01:06 code5717