Remove observer providing context
This commit is contained in:
parent
e7337227fe
commit
b6dc7c469b
@ -227,7 +227,7 @@ static NSString *const playbackRate = @"rate";
|
|||||||
_player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
|
_player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
|
||||||
|
|
||||||
if (_playbackRateObserverRegistered) {
|
if (_playbackRateObserverRegistered) {
|
||||||
[_player removeObserver:self forKeyPath:playbackRate];
|
[_player removeObserver:self forKeyPath:playbackRate context:nil];
|
||||||
_playbackRateObserverRegistered = NO;
|
_playbackRateObserverRegistered = NO;
|
||||||
}
|
}
|
||||||
[_player addObserver:self forKeyPath:playbackRate options:0 context:nil];
|
[_player addObserver:self forKeyPath:playbackRate options:0 context:nil];
|
||||||
@ -676,7 +676,7 @@ static NSString *const playbackRate = @"rate";
|
|||||||
{
|
{
|
||||||
[_player pause];
|
[_player pause];
|
||||||
if (_playbackRateObserverRegistered) {
|
if (_playbackRateObserverRegistered) {
|
||||||
[_player removeObserver:self forKeyPath:playbackRate];
|
[_player removeObserver:self forKeyPath:playbackRate context:nil];
|
||||||
_playbackRateObserverRegistered = NO;
|
_playbackRateObserverRegistered = NO;
|
||||||
}
|
}
|
||||||
_player = nil;
|
_player = nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user