我正在使用KVO监视AVQueuePlayer.timeControlStatus
:
timeControlStatusObservation = avPlayer.observe(
\AVQueuePlayer.timeControlStatus,
options: [.old, .new],
changeHandler: {
[weak self] (player, change) in
print("timeControlState: \(change.oldValue), \(change.newValue), \(self?.avPlayer.timeControlStatus)")
})
change.oldValue
和change.newValue
始终为零,但是avPlayer.timeControlStatus
确实具有正确的值。我得到了以下日志:
timeControlState: nil, nil, Optional(playing)
timeControlState: nil, nil, Optional(paused)
为什么KVO给出零值?这是图书馆的错误吗?