Canardoux / flutter_sound

Flutter plugin for sound. Audio recorder and player.
Mozilla Public License 2.0
876 stars 574 forks source link

[BUG]: flutter sound is not returning position on android but works fine on ios #930

Open amirhosseinkz opened 2 years ago

amirhosseinkz commented 2 years ago

Flutter Sound Version: 9.2.13

|-- flutter_sound 9.2.13 | |-- flutter_sound_platform_interface 9.2.13 | |-- flutter_sound_web 9.2.13 | | |-- flutter_sound_platform_interface...



This is only happening in android and works fine on ios


When I start playing and listening to progress, the returning position or duration of the file is always zero, and again, this is not happening on ios.

Nothing special is put into logs


Here is my code:

await soundPlayer.openPlayer(); await soundPlayer.setSubscriptionDuration(const Duration(seconds: 1)); await soundPlayer.startPlayer( fromURI: list[index].url.toString(), codec: Codec.aacADTS, whenFinished: () async { whenFeedbackIsFinished(list); });

currentPositionOfVoiceNew();

Future currentPositionOfVoiceNew() async { _mPlayerSubscription = soundPlayer.onProgress?.listen((e) { currentLenght = e.position.inSeconds.toString(); update(); }); }

prameshbajra commented 1 year ago

Might be related

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.