We have an app that uses an AVPlayer to play HLS audio streams.
Pre-iOS 13.x, we’d frequently see AVPlayerItemFailedToReachEnd errors thrown whenever there was a WiFi -> cellular network handoff. At that point, the only way to successfully resume playback was to invalidate the current AVPlayerItem and create a new one. That worked, but could introduce up to several seconds of silence as the player spun up again.
That behavior seems to have changed with one of the 13.x releases (not sure which one). Now, WiFi-> cell transitions don’t throw the player item error, and AVPlayer seems to be doing some auto-recovery of the stream behind the scenes. There’s no need to manually restart playback by tearing down/recreating the player item, and no gap in playback.
That’s nice, but introduces a new issue; AVPlayer always seems to restart playback at the beginning of the chunk that was playing when the network handoff occurred, so up to 10 seconds of the stream gets repeated.
Just wondering if anyone is seeing similar behavior, and if there’s any way to prevent the repeating, which is annoying for users that are frequently moving back and forth between WiFi and cell networks.