Привет есть задача зациклить плеер
NotificationCenter.default.addObserver(self,
selector: #selector#selector(playerDidFinishPlaying(notification:)),
name: NSNotification.Name.AVPlayerItemDidPlayToEndTime,
object: avpPlayer?.currentItem)
Но хотелось бы сделать через KVO
Не получается
token = avpPlayer.observe(\.currentItem? (currentItem?.status или еще что ), options: [.new, .initial, .old, .prior], changeHandler: { player, change in
print(change)
})
Принт работает на init / deinit как отловить конец ролика?