Call setRate instead of pause/play as they are equivalent (fixes #75)
Video was resuming after seek when setRate was called after play/pause in applyModifiers. According to Apple's docs play/pause are equivalent to setRate:1.0 and setRate:0.0, meaning that if rate was 1.0 the video resumed after seeking completed.
This commit is contained in:
parent
69f4a35de7
commit
153eb59c41
@ -297,12 +297,12 @@ static NSString *const statusKeyPath = @"status";
|
|||||||
if (paused) {
|
if (paused) {
|
||||||
[self stopProgressTimer];
|
[self stopProgressTimer];
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[_player pause];
|
[_player setRate:0.0];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
[self startProgressTimer];
|
[self startProgressTimer];
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[_player play];
|
[_player setRate:_rate];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,9 +379,6 @@ static NSString *const statusKeyPath = @"status";
|
|||||||
[self setResizeMode:_resizeMode];
|
[self setResizeMode:_resizeMode];
|
||||||
[self setRepeat:_repeat];
|
[self setRepeat:_repeat];
|
||||||
[self setPaused:_paused];
|
[self setPaused:_paused];
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
|
||||||
[_player setRate:_rate];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setRepeat:(BOOL)repeat {
|
- (void)setRepeat:(BOOL)repeat {
|
||||||
|
Loading…
Reference in New Issue
Block a user