ios avplayer trigger streaming is out of buffer
问题 I want to reconnect to the server when the streaming buffer is empty. How can I trigger a method when the AVPlayer or AVPlayerItem buffer is empty? I know there are playbackLikelyToKeepUp , playbackBufferEmpty and playbackBufferFull methods to check the buffer status, but those are not callbacks. Are there any callback functions, or any observers I should add? 回答1: you can add observer for those keys: [playerItem addObserver:self forKeyPath:@"playbackBufferEmpty" options