feat: add dual subtitle support for language learning (desktop only)#1286
feat: add dual subtitle support for language learning (desktop only)#1286lakshayrastogi wants to merge 1 commit into
Conversation
…p only) Adds a "Secondary Subtitle" section to the player subtitles menu, allowing users to select a second subtitle track that renders simultaneously with the primary one. Gated to desktop only via platform.shell.active since it relies on mpv's secondary-sid. - Add setSecondarySubtitlesTrack to useVideo hook - Add selectSecondaryTrack callback and menuProps in useSubtitles - Build secondary subtitle section in SubtitlesMenu (appears when primary selected + desktop shell active) - Secondary section has own language list, click handlers, OFF button - Hollow circle indicator for secondary vs filled for primary - All existing subtitle selection behavior preserved (no interference) - Platform guard: invisible on web, mobile, and TV platforms - Translation: PLAYER_SUBTITLES_SECONDARY key with defaultValue fallback
5975975 to
467b049
Compare
|
how can you learn a language with double subs? :D I cannot comprehend why would somebody want to read in a non native lang when learning it. this is super hard to do, the subs are usually so fast that for the person who learns a language its the opposite, you actually choose a non native audio and native subs to get the hear and understand that lang you are learning, for most people its impossible to read so fast in the lang you are learning. im sorry but i feel like this feature is pointless and it adds uneccessary complexity to the Player and the app itself. |
|
Well, I have found that as an intermediate learner of French now, I can
watch movies with french audio and english subtitles but i need to keep
pausing and checking the words because I don't yet know all the words.
Usually I will pause, repeat the audio and possibly look up the french word
for the english word (they don't sound like they are written many times
which makes this harder too!) - this is tedious to do and takes away from
the joy of watching. Think of the dual subtitles as being training wheels
because I get to see the translation right there after at max pausing for a
split second if at all. I actually hooked this up in an external player
through Stremio and found it helpful but I have to jump through a few hoops
to do it on every stream that I need to. Plus what I would really like to
do is add this on the tv app because I haven't found a way to do that
natively and I don't want to cast from my laptop every time - I know this
set of PRs is for the desktop but I was hoping I could add it as a next set
once this went through.
Lastly, secondary subtitles are built into many libraries in general so
regardless of my motivation to use it for language learning, it's an
accepted norm.
Appreciate your response either way and on a separate note, thank you so
much for building stremio - I have consistently evangelised it amongst my
friends (probably in over a 100 households) wherever I have gone and
everyone loves it. I love it too!
…On Fri, May 22, 2026 at 4:16 AM Timothy Z. ***@***.***> wrote:
*kKaskak* left a comment (Stremio/stremio-web#1286)
<#1286 (comment)>
how can you learn a language with double subs? :D I cannot comprehend why
would somebody want to read in a non native lang when learning it. this is
super hard to do, the subs are usually so fast that for the person who
learns a language its the opposite, you actually choose a non native audio
and native subs to get the hear and understand that lang you are learning,
for most people its impossible to read so fast in the lang you are
learning. im sorry but i feel like this feature is pointless and it adds
uneccessary complexity to the Player and the app itself.
—
Reply to this email directly, view it on GitHub
<#1286 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRR4RKIFJU4WF4GVFFES6L44AZIFAVCNFSM6AAAAACZIKEEQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DKMJYGE3DGOBRGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
|
I think this could be easily implemented as an add-on, which would work on all platforms. |
@mrcanelas thanks for the suggestion, I tried this - the problem is that finding the two subtitles that work together from the lists returned by opensubtitles is a hard problem and it really needs a user to compare and decide if the timing and lyrics match. For now I have made the addon return all combinations (little clunky but will do for now) but the ideal solution would give controls to the user in the player to select a second language from the same list of subtitles as the first. |
Can you send the code? Did you compare the subtitle names? Ideally, you should use the existing OpenSubtitle add-on and combine the subtitles it returns for each IMDb ID. You can also analyze the timing of the dialogues within the subtitles to synchronize them. |
Summary
Adds a "Secondary Subtitle" section to the player subtitles menu, allowing users to select a second subtitle track that renders simultaneously with the primary one. Gated to desktop only (
platform.shell.active) since it relies on mpv'ssecondary-sid. Primary subtitle selection behavior is completely unchanged.Motivation
Enables language learning workflows - e.g., watching French content with French as primary and English as secondary subtitles simultaneously.
Changes
src/routes/Player/useVideo.jsselectedSecondarySubtitlesTrackIdto video statesetSecondarySubtitlesTrack(id)function (does NOT nullify primary)src/routes/Player/useSubtitles.tsselectSecondaryTrackcallbackdisableSubtitles()also clears secondary trackisShellActiveand secondary track info tomenuPropstoggleSubtitlesshortcut to include secondary track statesrc/routes/Player/SubtitlesMenu/SubtitlesMenu.jsisShellActive+ callback exists)src/routes/Player/SubtitlesMenu/styles.less.secondary-header,.secondary-selected,.secondary-iconstylessrc/routes/Player/SubtitlesMenu/SubtitleVariant/SubtitleVariant.less.secondary-iconstyle only (variant component itself is unchanged)src/routes/Player/useSubtitles.d.tsPlatform Gating
The secondary section only appears when:
platform.shell.active- established pattern)Invisible on web, mobile, and TV platforms.
Translation
PLAYER_SUBTITLES_SECONDARYkey used withdefaultValue: 'Secondary Subtitle'fallback.Related
Related PRs