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

PlayList Network Duration only shows 0:00:00.000000

Open nexpage opened this issue 3 years ago • 4 comments

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?

nexpage avatar Jul 24 '22 04:07 nexpage

This issue is for iOS simulator. Android Simulator is working.

nexpage avatar Jul 24 '22 14:07 nexpage

I saw that there was a this error: [ServicesDaemonManager] interruptionHandler is called. -[FontServicesDaemonManager connection]_block_invoke

nexpage avatar Jul 24 '22 16:07 nexpage

Screenshot 2022-07-31 at 9 28 51 AM

This is what is returned when I played the audio url on postman.

nexpage avatar Jul 31 '22 01:07 nexpage

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

ZhangZhiH avatar Aug 15 '22 12:08 ZhangZhiH