From ab4b6edc61c6803b50713536c37d63f863433b3e Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Sat, 22 Dec 2018 15:47:21 -0800 Subject: [PATCH] Merge pull request #1395 from react-native-community/bugfix/maxbitrate-apply-mods Fix iOS video not displaying after switching source (rebased from commit 478c135d89f805c903b7b2fe72bf7a67f5ff2841) --- ios/Video/RCTVideo.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ios/Video/RCTVideo.m b/ios/Video/RCTVideo.m index d9731b59dd..da33ed24ae 100644 --- a/ios/Video/RCTVideo.m +++ b/ios/Video/RCTVideo.m @@ -1305,7 +1305,7 @@ - (void)setVolume:(float)volume - (void)setMaxBitRate:(float) maxBitRate { _maxBitRate = maxBitRate; - [self applyModifiers]; + _playerItem.preferredPeakBitRate = maxBitRate; } @@ -1319,8 +1319,7 @@ - (void)applyModifiers [_player setMuted:NO]; } - _playerItem.preferredPeakBitRate = _maxBitRate; - + [self setMaxBitRate:_maxBitRate]; [self setSelectedAudioTrack:_selectedAudioTrack]; [self setSelectedTextTrack:_selectedTextTrack]; [self setResizeMode:_resizeMode];