REPOSITORY CODING · MEDIUM
Export only the selected subtitle language
A download for one language includes cues from other tracks. Repair export selection without changing document state, ordering, WebVTT timestamps, escaping or wrapping. An unknown track produces a header-only document; omitting track retains the combined export.
Architecture ExtensionSubtitle editing service
Work through a real codebase.
Choose an environment, investigate the existing implementation and use the tests to check your change. Sign in to open a workspace; execution and Ono usage follow your plan’s allowances.
Task requirements and environments
JavaScript · 50 minute session
- Times are integer milliseconds. Cue intervals include the start and exclude the end. IDs are unique within a document. Commands execute in order and return either a value or an error.
- Shift moves every selected start and end by the same signed delta. Validate the entire selection and expected revision before committing. No cue may start before zero.
- Layout preserves explicit line breaks and wraps on whitespace. Count Unicode code points; do not split long words. Width must be an integer from 1 to 120.
- Conflicts reports every overlapping pair within the same track, including nested cues. Adjacent cues and different tracks do not conflict. Order results by overlap start, then the sorted IDs.
- Snapshot cues are ordered by start, then end, then ID. Split, export, add and remove must keep their existing behavior. This service processes document batches, not collaborative edits.
React · 50 minute session
- Times are integer milliseconds. Cue intervals include the start and exclude the end. IDs are unique within a document. Commands execute in order and return either a value or an error.
- Shift moves every selected start and end by the same signed delta. Validate the entire selection and expected revision before committing. No cue may start before zero.
- Layout preserves explicit line breaks and wraps on whitespace. Count Unicode code points; do not split long words. Width must be an integer from 1 to 120.
- Conflicts reports every overlapping pair within the same track, including nested cues. Adjacent cues and different tracks do not conflict. Order results by overlap start, then the sorted IDs.
- Snapshot cues are ordered by start, then end, then ID. Split, export, add and remove must keep their existing behavior. This service processes document batches, not collaborative edits.