SRGSSR / srgmediaplayer-apple

An advanced media player library, simple and reliable
MIT License
159 stars 33 forks source link

Incorrect state when disconnecting Airplay while the player is seeking #8

Closed defagos closed 6 years ago

defagos commented 7 years ago

If Airplay is disconnected when the player is seeking, playback does not correctly resume on the device.

Issue overview

Description of the problem

If Airplay is disconnected when the player is seeking, playback does not correctly resume on the device. The loading indicator spins endlessly. Seeking to an arbitrary location fixes the issue, though.

Environment information

Reproducibility

Steps to reproduce

  1. Open the media player demo
  2. Play Apple Advanced Stream using the SRG media player
  3. Enable Airplay
  4. Seek and disconnect Airplay before seeking ends
  5. The player is now in an inconsistent state
defagos commented 6 years ago

Tested with 2.2.2 on iOS 11, this now works.

Moreover, I am now pretty convinced that this was resulting from the exact same problem as described in #44 (no finished seek, leading to undefined behavior).