SwiftAudio icon indicating copy to clipboard operation
SwiftAudio copied to clipboard

progress bar on MPRemoteCommandCenter (sometime on AudioPlayer.currentTime) still update when player on .loading or .buffering state

Open cendolinside123 opened this issue 5 years ago • 2 comments
trafficstars

Describe the bug I set my network link conditioner on 3g, when I play a song at music player at the middle of song music player state change to .loading or .buffering and progress bar on music player interface didn't update/moving but progress bar on MPRemoteCommandCenter still updateing the value

update:

it's happend on AudioPlayer.currentTime too, sometime when player still buffer AudioPlayer.currentTime keep updating the value too. For this condition I reproduce it by turn on network link conditioner to very bad network at the first time song is loaded

To Reproduce set network link conditioner to 3G edit: try to play network link conditioner from turn off to very bad network when song is playing and buffer position still updating like the example of this video

http://www.mediafire.com/file/hsrcb07siyypbhp/VID20200310132441.mp4/file

IMG20200310135558

in this video I use streaming song from https://www.eclassical.com/custom/eclassical/files/BIS1447-002-flac_24.flac because the duration of sample song that available on the SwiftAudio example is to short

make sure change network link conditioner to very bad network when song is playing but bufferedPosition still updating their value

Expected behavior not updating progress bar until player state change to .playing like progress bar on music player

Smartphone (please complete the following information):

  • Device: iPhone 6s
  • OS: iOs 13.1.2
  • Version 0.11.2

cendolinside123 avatar Feb 29 '20 05:02 cendolinside123

after all it's look like I can create a handle for some error.

  • adding automaticallyWaitsToMinimizeStalling = true to handle when player still .buffering or .loading but AudioPlayer.currentTime keep updating the value
  • adding nowPlayingInfoController.set(keyValue: NowPlayingInfoProperty.playbackRate(0)) to handle when player still .buffering or .loading but MPRemoteCommandCenter keep updating the progress

cendolinside123 avatar Apr 26 '20 06:04 cendolinside123

@jorgenhenrichsen

cendolinside123 avatar Mar 18 '21 09:03 cendolinside123