所以在一个简单的控制器的初始化我有这个代码: self.playerItem = [AVPlayerItem playerItemWithURL:url];[self.playerItem addObserver:self forKeyPath:@"status" options:0 context:nil]; 应该尝试从网址加载媒体,对吧?
self.playerItem = [AVPlayerItem playerItemWithURL:url]; [self.playerItem addObserver:self forKeyPath:@"status" options:0 context:nil];
应该尝试从网址加载媒体,对吧?我正在实施
observeValueForKeyPath:ofObject:change:context:
但是,从不调用此方法.独领风骚?
playerItem在分配给AVPlayer对象后开始工作(duh)self.player = [AVPlayer playerWithPlayerItem:self.playerItem];