From f35bbbed43b53e1faaefc147df58f21941a87e4f Mon Sep 17 00:00:00 2001 From: Kai Barnes Date: Thu, 23 May 2019 16:35:32 +0900 Subject: [PATCH] fix: Android playback issues using changes from react-native-video #1529 --- .../java/com/brentvatne/exoplayer/ReactExoplayerView.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 52edc86a7d..688de504f1 100644 --- a/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android-exoplayer/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -975,8 +975,8 @@ public void setSelectedTrack(int trackType, String type, Dynamic value) { groupIndex = getGroupIndexForDefaultLocale(groups); } - if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO) { // Video auto - if (groups.length != 0) { + if (groupIndex == C.INDEX_UNSET && trackType == C.TRACK_TYPE_VIDEO && groups.length != 0) { // Video auto + // Add all tracks as valid options for ABR to choose from TrackGroup group = groups.get(0); tracks = new int[group.length]; groupIndex = 0; @@ -984,7 +984,7 @@ public void setSelectedTrack(int trackType, String type, Dynamic value) { tracks[j] = j; } } - } else if (groupIndex == C.INDEX_UNSET) { + if (groupIndex == C.INDEX_UNSET) { trackSelector.setParameters(disableParameters); return; }