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

Post not yet marked as solved Up vote post of patatrouf Down vote post of patatrouf
1.1k views

Replies

Having the exact same issue