I'm finding that on iOS 15, AVPlayer is adjusting its rate to 0.0 with the notification reason AVPlayerRateDidChangeReasonAppBackgrounded
, even when the app is still in the foreground.
This seems to occur when a view containing an AVPlayerLayer is removed from the view hierarchy (for example, when a view controller is dismissed).
It seems like the only way to resolve this is to set the AVPlayerLayer's player to nil
before it is removed from the view hierarchy.
Anyone else experiencing this? Any other workarounds?