fix(multiple-subtitles): render overlapping cues on legacy hosts [PKG-MULTI-SUB-10]

This commit is contained in:
Harvey Zhao committed 2026-09-14 13:26:42 +08:00
1 parent 31f9024bff
commit 8ae2762a23
24 files changed
+3465 -56

No files matched your search

@@ -34,13 +34,16 @@ export function serializeTracks(trees: readonly (Track | undefined)[]): string {
for (const cue of tree.cues) {
const children: CueNode[] = []
for (const child of cue.tree.children) {
if (child.type === 'timestamp')
if (child.type === 'timestamp') {
children.push(markTimestamp(child))
else children.push(
{ type: 'text', value: `<div class="art-subtitle-${tree.name}">` },
prepareCueNode(child),
{ type: 'text', value: '</div>' },
)
}
else {
children.push(
{ type: 'text', value: `<div class="art-subtitle-${tree.name}">` },
prepareCueNode(child),
{ type: 'text', value: '</div>' },
)
}
}
cues.push({
...cue,