Defect fix for issue #1460
Defect fix: https://github.com/react-native-community/react-native-video/issues/1460
This commit is contained in:
parent
8dd782d91e
commit
938cfd64a5
@ -876,7 +876,7 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
TrackGroup group = groups.get(i);
|
TrackGroup group = groups.get(i);
|
||||||
for (int j = 0; j < group.length; j++) {
|
for (int j = 0; j < group.length; j++) {
|
||||||
Format format = group.getFormat(j);
|
Format format = group.getFormat(j);
|
||||||
if (format.height == value.asInt()) {
|
if (format.height == height) {
|
||||||
groupIndex = i;
|
groupIndex = i;
|
||||||
tracks[0] = j;
|
tracks[0] = j;
|
||||||
break;
|
break;
|
||||||
@ -894,15 +894,13 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
groupIndex = getGroupIndexForDefaultLocale(groups);
|
groupIndex = getGroupIndexForDefaultLocale(groups);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO) { // Video auto
|
if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO && groups.length > 0) { // Video auto
|
||||||
if (groups.length != 0) {
|
|
||||||
TrackGroup group = groups.get(0);
|
TrackGroup group = groups.get(0);
|
||||||
tracks = new int[group.length];
|
tracks = new int[group.length];
|
||||||
groupIndex = 0;
|
groupIndex = 0;
|
||||||
for (int j = 0; j < group.length; j++) {
|
for (int j = 0; j < group.length; j++) {
|
||||||
tracks[j] = j;
|
tracks[j] = j;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if (groupIndex == C.INDEX_UNSET) {
|
} else if (groupIndex == C.INDEX_UNSET) {
|
||||||
trackSelector.setParameters(disableParameters);
|
trackSelector.setParameters(disableParameters);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user