Skip to content

Commit f35bbbe

Browse files
committed
fix: Android playback issues using changes from react-native-video TheWidlarzGroup#1529
1 parent f38b6f8 commit f35bbbe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -975,16 +975,16 @@ public void setSelectedTrack(int trackType, String type, Dynamic value) {
975975
groupIndex = getGroupIndexForDefaultLocale(groups);
976976
}
977977

978-
if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO) { // Video auto
979-
if (groups.length != 0) {
978+
if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO && groups.length != 0) { // Video auto
979+
// Add all tracks as valid options for ABR to choose from
980980
TrackGroup group = groups.get(0);
981981
tracks = new int[group.length];
982982
groupIndex = 0;
983983
for (int j = 0; j < group.length; j++) {
984984
tracks[j] = j;
985985
}
986986
}
987-
} else if (groupIndex == C.INDEX_UNSET) {
987+
if (groupIndex == C.INDEX_UNSET) {
988988
trackSelector.setParameters(disableParameters);
989989
return;
990990
}

0 commit comments

Comments
 (0)