Merge pull request #2167 from redspear/1930-ios-reapply-rate-modifier
Fix: iOS rate is reset to 1.0 after play/pause #1930
This commit is contained in:
commit
db58ba90f1
@ -718,7 +718,10 @@ static int const RCTVideoUnset = -1;
|
||||
}
|
||||
} else if (object == _player) {
|
||||
if([keyPath isEqualToString:playbackRate]) {
|
||||
if(self.onPlaybackRateChange) {
|
||||
if (_player.rate > 0 && _rate > 0 && _player.rate != _rate) {
|
||||
// Playback is resuming, apply rate modifer.
|
||||
[_player setRate:_rate];
|
||||
} else if(self.onPlaybackRateChange) {
|
||||
self.onPlaybackRateChange(@{@"playbackRate": [NSNumber numberWithFloat:_player.rate],
|
||||
@"target": self.reactTag});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user