Skip to content

Commit

Permalink
Enable control of forced subtitle track
Browse files Browse the repository at this point in the history
  • Loading branch information
moneytoo committed Jul 25, 2024
1 parent 764aacc commit f9d385c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ private ImmutableList<TrackInformation> gatherSupportedTrackInfosOfType(
}
Format trackFormat = trackGroup.getTrackFormat(trackIndex);
if ((trackFormat.selectionFlags & C.SELECTION_FLAG_FORCED) != 0) {
continue;
// continue;
}
String trackName = trackNameProvider.getTrackName(trackFormat);
trackInfos.add(new TrackInformation(tracks, trackGroupIndex, trackIndex, trackName));
Expand Down Expand Up @@ -2149,8 +2149,7 @@ public void onBindViewHolderAtZeroPosition(SubSettingViewHolder holder) {
player.setTrackSelectionParameters(
trackSelectionParameters
.buildUpon()
.clearOverridesOfType(C.TRACK_TYPE_TEXT)
.setIgnoredTextSelectionFlags(~C.SELECTION_FLAG_FORCED)
.setTrackTypeDisabled(C.TRACK_TYPE_TEXT, /* disabled= */ true)
.build());
settingsWindow.dismiss();
}
Expand Down

0 comments on commit f9d385c

Please sign in to comment.