From fb1d6bdef7210d43f9e34f673691a9a17b95424e Mon Sep 17 00:00:00 2001 From: Seyed Mostafa Hasani Date: Wed, 24 Jul 2024 11:38:37 +0330 Subject: [PATCH] fix: index of the selected track (#4012) --- .../main/java/com/brentvatne/exoplayer/ReactExoplayerView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java index 33df071a..8ebba8c5 100644 --- a/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java +++ b/android/src/main/java/com/brentvatne/exoplayer/ReactExoplayerView.java @@ -1591,7 +1591,7 @@ public class ReactExoplayerView extends FrameLayout implements if (format.sampleMimeType != null) track.setMimeType(format.sampleMimeType); if (format.language != null) track.setLanguage(format.language); if (format.label != null) track.setTitle(format.label); - track.setSelected(isTrackSelected(selection, group, 0)); + track.setSelected(isTrackSelected(selection, group, trackIndex)); return track; }