AirPlay external playback might be interrupted in some cases, for example when calling a playback method for a media already being externally played.
The reason is that the current implementation performs unnecessary resets of the AVPlayerallowsExternalPlayback property. We must avoid setting this property to NO unnecessarily when it was YES and we still want the value to be YES afterwards.
In other words, if allowsExternalPlayback is YES at some point,
AirPlay external playback might be interrupted in some cases, for example when calling a playback method for a media already being externally played.
The reason is that the current implementation performs unnecessary resets of the
AVPlayer
allowsExternalPlayback
property. We must avoid setting this property toNO
unnecessarily when it wasYES
and we still want the value to beYES
afterwards.In other words, if
allowsExternalPlayback
isYES
at some point,is not equivalent to doing nothing. The temporary reset to
NO
will trigger a brief AirPlay interruption.