Playback position set to 0 when switch between local and external playback

When playing an HLS/FairPlay VOD content, the playback position sometimes jumps to 0 during the transition between local and external playback (and the other way around). The app does nothing during the transition, apart from responding to ContentKeySession key requests.

It is not systematic but occurs quite often. When the issue occurs, the playback sometimes resumes to the position where it was before the transition but usually it does not.

Most of the time, when the issue occur, the iOS app periodic time observer gets triggered and the AVPlayerItem currentTime() has the specific value 0.001s.

Here is an extract of our iOS app logs with the value of AVPlayerItem.currentTime() when the AVPlayer PeriodicTimeObserver is triggered:

πŸ“˜ [8:21:54.520] Did update playback time: 4512.001719539
πŸ“˜ [8:21:55.472] Did update playback time: 4512.958677777778
πŸ“— [8:21:55.497] Player external playback active changed to: true
πŸ“˜ [8:21:57.674] Did update playback time: 4512.001897709
πŸ“˜ [8:21:57.779] Did update playback time: 4511.974062125
πŸ“˜ [8:21:57.800] Did update playback time: 4511.995523418
πŸ“˜ [8:21:57.805] Did update playback time: 4512.001181626
πŸ“˜ [8:21:58.806] Did update playback time: 4513.001841876
πŸ“˜ [8:21:59.794] Did update playback time: 4514.001132625
πŸ“˜ [8:22:00.795] Did update playback time: 4515.001653707
πŸ“˜ [8:22:01.562] Did update playback time: 4515.766148708
πŸ“— [8:22:01.679] Player external playback active changed to: false
πŸ“˜ [8:22:01.683] Did update playback time: 0.001
πŸ“˜ [8:22:01.700] Did update playback time: 4510.0
πŸ“˜ [8:22:01.737] Did update playback time: 4510.0
πŸ“˜ [8:22:01.988] Did update playback time: 4509.956132376
πŸ“˜ [8:22:01.990] Did update playback time: 4509.958216834
πŸ“˜ [8:22:03.033] Did update playback time: 4511.0015079
πŸ“˜ [8:22:04.033] Did update playback time: 4512.001688753
πŸ“˜ [8:22:05.033] Did update playback time: 4513.001998495
πŸ“˜ [8:22:06.033] Did update playback time: 4514.001205557
πŸ“˜ [8:22:06.045] Did update playback time: 4514.0325555555555
πŸ“— [8:22:06.080] Player external playback active changed to: true
πŸ“˜ [8:22:06.800] Did update playback time: 0.0
πŸ“˜ [8:22:06.814] Did update playback time: 0.0
πŸ“˜ [8:22:08.168] Did update playback time: 0.002258708
πŸ“˜ [8:22:08.218] Did update playback time: -0.075460416
πŸ“˜ [8:22:08.237] Did update playback time: -0.063310916
πŸ“˜ [8:22:09.298] Did update playback time: 1.001932292
πŸ“˜ [8:22:10.295] Did update playback time: 2.003054584
πŸ“˜ [8:22:11.302] Did update playback time: 3.001831125
πŸ“˜ [8:22:12.301] Did update playback time: 4.001488001
  1. Local -> AirPlay: no issue
  2. AirPlay -> Local: the issue occurs temporarily and the playback approximately returns to its position before the transition
  3. Local -> AirPlay: the issue occurs permanently and the playback continues from the beginning of the stream.

I've filed a feedback for this issue with both iOS device and AppleTV sysdiagnoses: https://feedbackassistant.apple.com/feedback/11990309

Having the exact same issue