1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2024-12-24 17:10:33 +00:00

Fixed selected subtitle stream not being shown

closes #2393
this ammends my obviously incomplete fix in PR #2311.

This is just an UI issue. Subtitle track selection works, it just shows "No Captions" unfortunately.
This commit is contained in:
Redirion 2019-06-12 14:44:36 +02:00 committed by GitHub
parent 1684a2110c
commit af971b6a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -297,6 +297,7 @@ public abstract class VideoPlayer extends BasePlayer
return true; return true;
}); });
// Add all available captions
for (int i = 0; i < availableLanguages.size(); i++) { for (int i = 0; i < availableLanguages.size(); i++) {
final String captionLanguage = availableLanguages.get(i); final String captionLanguage = availableLanguages.get(i);
MenuItem captionItem = captionPopupMenu.getMenu().add(captionPopupMenuGroupId, MenuItem captionItem = captionPopupMenu.getMenu().add(captionPopupMenuGroupId,
@ -506,7 +507,7 @@ public abstract class VideoPlayer extends BasePlayer
} }
// Normalize mismatching language strings // Normalize mismatching language strings
final String preferredLanguage = trackSelector.getParameters().preferredTextLanguage; final String preferredLanguage = trackSelector.getPreferredTextLanguage();
// Build UI // Build UI
buildCaptionMenu(availableLanguages); buildCaptionMenu(availableLanguages);
if (trackSelector.getParameters().getRendererDisabled(textRenderer) || if (trackSelector.getParameters().getRendererDisabled(textRenderer) ||