79306636

Date: 2024-12-24 23:50:49
Score: 0.5
Natty:
Report link

Since iOS 10 it's better to user Block Based KVO instead of old KVO overriding func observeValue, like that:

player?.observe(\.rate, options: [.new]  changeHandler: { player, change in
    // video started
    if player.rate > 0 {
       // Do sth here
    }
})

but you could use another way that apple provides: https://stackoverflow.com/a/47723769/2529869

Reasons:
  • Blacklisted phrase (1): stackoverflow
  • Has code block (-0.5):
Posted by: Nosov Pavel