26 lines
1.5 KiB
Markdown
26 lines
1.5 KiB
Markdown
# Architecture
|
|
|
|
Subtitle Tools is a relocatable React application with a framework-independent
|
|
TypeScript subtitle model. The parser first applies byte/text and line bounds,
|
|
then produces one normalized cue model for SRT, WebVTT, ASS and a bounded flat
|
|
TTML profile. XML document types/entities are rejected; TTML resources,
|
|
inherited timing and layout are never resolved. Cue structure/text/timing
|
|
operations return new documents instead of mutating parser state. Serializers
|
|
are format-specific; cross-format export deliberately exposes its preservation
|
|
boundary.
|
|
|
|
Parsing and timing transformations are synchronous in v0.2 and therefore capped
|
|
at 4,000,000 UTF-16 units, 250,000 units per physical line and 100,000 cues. The
|
|
editor renders at most 10,000 cue rows and 2,000 issue rows, while validation and
|
|
export still cover the complete bounded document. Revision comparison is
|
|
index-aligned and linear rather than an unbounded semantic diff.
|
|
|
|
The optional waveform component creates a browser-native playback URL as soon as
|
|
media is selected. Decoding continues independently and transfers one PCM
|
|
channel to a disposable module worker, which produces at most 2,000 peak
|
|
buckets. Replacement and cancellation terminate the worker, suppress stale
|
|
results and retain the last valid waveform. Zoom/navigation changes only the
|
|
bounded peak view and native playback position. Inputs remain capped at 128 MiB
|
|
and four decoded hours; no codec, speech-recognition model or network service
|
|
runs.
|