Hi all,
I am using the AVQueuePlayer to play a bunch of clips in sequence and do some UI changes when each item ends. For this I am listening for the AVPlayerItemDidPlayToEndTimeNotification like so in the init() of my view controller:
NSNotificationCenter.defaultCenter().addObserver(self,
selector: #selector(HomeViewController.playerDidFinishPlaying(_:)),
name: AVPlayerItemDidPlayToEndTimeNotification,
object: nil)
This works as expected always in the tvOS simulator but on a real device(i.e. Apple TV 4 9.2.1 version) this doesn't always work. It works for a clip or two after which it just doesn't seem to fire this event. Anybody else faced this issue? Is there any work-around we can use to detect the end of a video item?
Thanks