Merge pull request #1395 from react-native-community/bugfix/maxbitrate-apply-mods

Fix iOS video not displaying after switching source
This commit is contained in:
Hampton Maxwell 2018-12-22 15:47:21 -08:00 committed by GitHub
commit 478c135d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -858,7 +858,7 @@ static int const RCTVideoUnset = -1;
- (void)setMaxBitRate:(float) maxBitRate {
_maxBitRate = maxBitRate;
[self applyModifiers];
_playerItem.preferredPeakBitRate = maxBitRate;
}
@ -872,8 +872,7 @@ static int const RCTVideoUnset = -1;
[_player setMuted:NO];
}
_playerItem.preferredPeakBitRate = _maxBitRate;
[self setMaxBitRate:_maxBitRate];
[self setSelectedAudioTrack:_selectedAudioTrack];
[self setSelectedTextTrack:_selectedTextTrack];
[self setResizeMode:_resizeMode];