Respect the pause property at all times
This commit is contained in:
@@ -37,6 +37,7 @@ static NSString *const statusKeyPath = @"status";
|
||||
float _volume;
|
||||
float _rate;
|
||||
BOOL _muted;
|
||||
BOOL _paused;
|
||||
}
|
||||
|
||||
- (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher {
|
||||
@@ -158,7 +159,6 @@ static NSString *const statusKeyPath = @"status";
|
||||
|
||||
[self startProgressTimer];
|
||||
[self attachListeners];
|
||||
[_player play];
|
||||
[self applyModifiers];
|
||||
} else if(_playerItem.status == AVPlayerItemStatusFailed) {
|
||||
[_eventDispatcher sendInputEventWithName:RNVideoEventLoadingError body:@{
|
||||
@@ -186,7 +186,6 @@ static NSString *const statusKeyPath = @"status";
|
||||
- (void)playerItemDidReachEnd:(NSNotification *)notification {
|
||||
AVPlayerItem *item = [notification object];
|
||||
[item seekToTime:kCMTimeZero];
|
||||
[_player play];
|
||||
[self applyModifiers];
|
||||
}
|
||||
|
||||
@@ -203,8 +202,9 @@ static NSString *const statusKeyPath = @"status";
|
||||
} else {
|
||||
[self startProgressTimer];
|
||||
[_player play];
|
||||
|
||||
}
|
||||
|
||||
_paused = paused;
|
||||
}
|
||||
|
||||
- (void)setSeek:(float)seekTime {
|
||||
@@ -265,6 +265,7 @@ static NSString *const statusKeyPath = @"status";
|
||||
}
|
||||
|
||||
[_player setRate:_rate];
|
||||
[self setPaused:_paused];
|
||||
}
|
||||
|
||||
- (void)setRepeatEnabled {
|
||||
|
||||
Reference in New Issue
Block a user