Skip to content

Commit

Permalink
Merge pull request TheWidlarzGroup#1395 from react-native-community/b…
Browse files Browse the repository at this point in the history
…ugfix/maxbitrate-apply-mods

Fix iOS video not displaying after switching source

(rebased from commit 478c135)
  • Loading branch information
cobarx authored and Beau Ner committed Oct 10, 2019
1 parent 2e43d8e commit ab4b6ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ios/Video/RCTVideo.m
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,7 @@ - (void)setVolume:(float)volume

- (void)setMaxBitRate:(float) maxBitRate {
_maxBitRate = maxBitRate;
[self applyModifiers];
_playerItem.preferredPeakBitRate = maxBitRate;
}


Expand All @@ -1319,8 +1319,7 @@ - (void)applyModifiers
[_player setMuted:NO];
}

_playerItem.preferredPeakBitRate = _maxBitRate;

[self setMaxBitRate:_maxBitRate];
[self setSelectedAudioTrack:_selectedAudioTrack];
[self setSelectedTextTrack:_selectedTextTrack];
[self setResizeMode:_resizeMode];
Expand Down

0 comments on commit ab4b6ed

Please sign in to comment.