-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
I have DASH video files containing closed captions links within the mpd file, so I'm not manually adding subtitles. Some video assets have Forced language captions that I don't want to show in the player (which is showing up twice). For example, French, German, and Spanish forced should be excluded in options user can select:
French (Parisian) (Forced)
German (Germany) (Forced)
Spanish (Castilian) (Forced)
French (Parisian) (Full)
German (Germany) (Full)
Spanish (Castilian) (Full)
Marathi (Full)
Norwegian (Full)
Danish (Full)
Turkish (Full)
I'm using the default StyledPlayerView, and have tried something along the lines of
DefaultTrackSelector.Parameters parameters = trackSelector
.buildUponParameters()
.setDisabledTextTrackSelectionFlags(C.SELECTION_FLAG_FORCED)
.build();
trackSelector.setParameters(parameters);
but with no success. I'm able to see the list of subtitles available with this:
int trackLength = trackSelector.getCurrentMappedTrackInfo().getTrackGroups(2).length;
for (int i = 0; i < trackLength; i++) {
Utils.log(trackSelector.getCurrentMappedTrackInfo().getTrackGroups(2).get(i).getFormat(0).label);
}
Not sure if changes should or can be made here to remove the unwanted captions.
Any help is appreciated, thank you.