Fix single track playback
This commit is contained in:
parent
c7b7390267
commit
e90ab21c91
@ -1612,14 +1612,19 @@ class ReactExoplayerView extends FrameLayout implements
|
|||||||
supportedFormatLength++;
|
supportedFormatLength++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tracks = new int[supportedFormatLength + 1];
|
if (allTracks.length == 1) {
|
||||||
int o = 0;
|
// With only one tracks we can't remove any tracks so attempt to play it anyway
|
||||||
for (int k = 0; k < allTracks.length; k++) {
|
tracks = allTracks;
|
||||||
Format format = group.getFormat(k);
|
} else {
|
||||||
if (isFormatSupported(format)) {
|
tracks = new int[supportedFormatLength + 1];
|
||||||
tracks[o] = allTracks[k];
|
int o = 0;
|
||||||
supportedTrackList.add(allTracks[k]);
|
for (int k = 0; k < allTracks.length; k++) {
|
||||||
o++;
|
Format format = group.getFormat(k);
|
||||||
|
if (isFormatSupported(format)) {
|
||||||
|
tracks[o] = allTracks[k];
|
||||||
|
supportedTrackList.add(allTracks[k]);
|
||||||
|
o++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user