mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-30 12:01:20 -08:00
fix(multiple-subtitles): render overlapping cues on legacy hosts [PKG-MULTI-SUB-10]
This commit is contained in:
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,
|
||||
|
||||
Reference in new issue
Block a user