AVPlayerItem and KVO - am i missing something?
so in the init of a simple Controller i have this code:
self.playerItem = [AVPlayerItem playerItemWithURL:url];
[self.playerItem addObserver:self forKeyPath:@"status" options:0 context:nil];
which should try and load media from the url, right? i'm implemeting
observeValueForKeyPath:ofObject:change:context:
however, this method开发者_如何学运维 is never called. Clueless?
playerItem starts working after being assigned to a AVPlayer object (duh)
self.player = [AVPlayer playerWithPlayerItem:self.playerItem];
精彩评论