Flutter sound is not returning position on android but works fine on ios
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.
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();
});
}