Flutter-AssetsAudioPlayer
Flutter-AssetsAudioPlayer copied to clipboard
PlayList Network Duration only shows 0:00:00.000000
I did a list of Playlist with network url, when I played the audio playlist the duration is always shown as 0:00:00.000000
var assetsAudioPlayer = AssetsAudioPlayer();
assetsAudioPlayer.current.value!.audio.duration: 0:00:00.000000
I did other methods but still duration is 0:00:00.000000
bookCtrl.assetsAudioPlayer.builderRealtimePlayingInfos(builder: (context, RealtimePlayingInfos? infos) {
print(infos.duration); // 0:00:00.000000
});
I added the audio like such:
await assetsAudioPlayer.open(
Playlist(audios: [
Audio.network('https://xxx'),
Audio.network('https://xxx'),
Audio.network('https://xxx'),
],
startIndex: 0),
loopMode: LoopMode.none,
showNotification: true,
respectSilentMode: true,
);
How do I get the duration of the network audio?
This issue is for iOS simulator. Android Simulator is working.
I saw that there was a this error:
[ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke
This is what is returned when I played the audio url on postman.
Hello. I have the same problem as you Maybe it was the newer version. I fixed the problem by lowering the version. My version is 3.0.4