fix(ios): crash due to persistent keyPath observer (#600)

This commit is contained in:
Austin Witherow 2018-01-02 12:06:43 -05:00 committed by Matt Apperson
parent ebe138fa8d
commit 093ffccd9b

View File

@ -252,6 +252,9 @@ static NSString *const timedMetadata = @"timedMetadata";
* observer set */ * observer set */
- (void)removePlayerItemObservers - (void)removePlayerItemObservers
{ {
if (_playerLayer) {
[_playerLayer removeObserver:self forKeyPath:readyForDisplayKeyPath];
}
if (_playerItemObserversSet) { if (_playerItemObserversSet) {
[_playerItem removeObserver:self forKeyPath:statusKeyPath]; [_playerItem removeObserver:self forKeyPath:statusKeyPath];
[_playerItem removeObserver:self forKeyPath:playbackBufferEmptyKeyPath]; [_playerItem removeObserver:self forKeyPath:playbackBufferEmptyKeyPath];