You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Select external subtitles to make them appear in engine.$subtitleTracks. #88
This is on main now (dd13c96) and will be part of the next release. External subtitle files register as first-class tracks:
// Any time after load: appears in engine.$subtitleTracks with a synthetic id and isExternal == true.
lettrack=engine.addExternalSubtitleTrack(ExternalSubtitleTrack(url:srtURL,name:"English",language:"en"))engine.selectSubtitleTrack(index:track.id) // same call as embedded tracks
// Declared at load instead, external tracks also join the native WebVTT renditions
// (subtitles in PiP / AirPlay), and preferredSubtitleLanguages ranks them:
LoadOptions(prepareNativeSubtitles:true,externalSubtitles:[ExternalSubtitleTrack(url:srtURL,language:"en")])
Details: selectSubtitleTrack/selectSecondarySubtitleTrack accept the synthetic ids and publish them via activeSubtitleTrackIndex; removeExternalSubtitleTrack(id:) unregisters; the descriptor carries name, language, forced/SDH flags, per-track HTTP headers, and a format hint. Tracks added after load are host-overlay only until the next load, because the rendition set is fixed in the master playlist at item creation. Full docs in the README quick start and docs/formats.md.
Leaving this open until you can confirm it covers your use case. If you can give it a try from main and report back, that would be much appreciated.
This is now shipped in 4.10.0, so you can pin a release tag instead of a main commit for testing. API surface is unchanged from the comment above: LoadOptions.externalSubtitles, addExternalSubtitleTrack, removeExternalSubtitleTrack, TrackInfo.isExternal.
Activity
Merge feat/external-subtitle-tracks: external subtitles as first-clas…
superuser404notfound commentedon Jul 2, 2026
This is on
mainnow (dd13c96) and will be part of the next release. External subtitle files register as first-class tracks:Details:
selectSubtitleTrack/selectSecondarySubtitleTrackaccept the synthetic ids and publish them viaactiveSubtitleTrackIndex;removeExternalSubtitleTrack(id:)unregisters; the descriptor carries name, language, forced/SDH flags, per-track HTTP headers, and a format hint. Tracks added after load are host-overlay only until the next load, because the rendition set is fixed in the master playlist at item creation. Full docs in the README quick start and docs/formats.md.Leaving this open until you can confirm it covers your use case. If you can give it a try from
mainand report back, that would be much appreciated.superuser404notfound commentedon Jul 2, 2026
This is now shipped in 4.10.0, so you can pin a release tag instead of a main commit for testing. API surface is unchanged from the comment above:
LoadOptions.externalSubtitles,addExternalSubtitleTrack,removeExternalSubtitleTrack,TrackInfo.isExternal.feat(subtitles): ExternalSubtitleTrack descriptor + TrackInfo.isExter…
feat(subtitles): external track registry + LoadOptions.externalSubtit…
feat(subtitles): unified external selection routing + auto-select gate (
feat(subtitles): native rendition + PiP for load-declared external tr…
docs(subtitles): external subtitle tracks API (superuser404notfound#88)
ijuniorfu commentedon Jul 4, 2026
Thank you very much; the test went smoothly.