We are noticing that when we perform KVO Observations on AVPlayer properties and we pass [.old, .new] some properties still cause NSKeyValueObservation result to have nil values for oldValue, newValue.
Example:
(note that according to https://developer.apple.com/documentation/avfoundation/avplayeritem/1389493-status "You can observe this change using key-value observing.")
Oddly observing isPlaybackLikelyToKeepUp does provide non-nil oldValue, newValue
Does anyone know the reason for this?
Thank you
Example:
(note that according to https://developer.apple.com/documentation/avfoundation/avplayeritem/1389493-status "You can observe this change using key-value observing.")
Code Block playerItemStatusObservation = item.observe(\AVPlayerItem.status, options: [.old, .new]) {[weak self] item, change in // using `[.old, .new]` as options doesn't actually returns non-nil values in the `change` parameter! }
Oddly observing isPlaybackLikelyToKeepUp does provide non-nil oldValue, newValue
Code Block playerItemLikelyToKeepUpObservation = item.observe(\AVPlayerItem.isPlaybackLikelyToKeepUp, options: [.old, .new]) {[weak self] item, change in // using `[.old, .new]` as options actually returns non-nil values in `change` }
Does anyone know the reason for this?
Thank you