Skip to content

Add multi-language subtitle support to ExoPlayer#9

Merged
jpcottin merged 1 commit into
masterfrom
feature/subtitle-support
May 31, 2026
Merged

Add multi-language subtitle support to ExoPlayer#9
jpcottin merged 1 commit into
masterfrom
feature/subtitle-support

Conversation

@jpcottin

Copy link
Copy Markdown
Owner

Summary

Add automatic subtitle detection and language selection to the ExoPlayer implementation.

  • Auto-detects .srt subtitle files in video directories
  • Extracts language codes from filenames (e.g., video_en.srt, video_fr.srt)
  • Provides a language selector dropdown in the player UI (CC icon, top-right)
  • Uses Media3 trackSelectionParameters to manage subtitle track selection
  • Displays human-readable language names via Java Locale

Testing

Tested on R37 emulator with "Tears of Steel" torrent containing 8 language subtitles:

  • ✅ Subtitles auto-detect and load
  • ✅ Language selector displays all available languages with proper names
  • ✅ Language selection works and subtitles display correctly
  • ✅ None option disables subtitles

Changes

  • PlayerScreen.kt: Added subtitle detection, UI selector, and language management
  • README.md: Added subtitle feature to features list, updated project structure notes, added player screenshot
  • screenshots/player_subtitles.png: New screenshot showing player with subtitle selector

- Auto-detect .srt subtitle files in video directory
- Extract language codes from filenames (e.g., movie_en.srt)
- Display language selector dropdown in player UI (CC icon, top-right)
- Use Media3 trackSelectionParameters to manage language selection
- Show human-readable language names via Java Locale
- Update README with subtitle feature and player screenshot
@jpcottin jpcottin merged commit 9cf99b4 into master May 31, 2026
4 checks passed
@jpcottin jpcottin deleted the feature/subtitle-support branch May 31, 2026 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant