mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
refactor(multiple-subtitles): [PKG-MULTI-SUB-04] type runtime modules and vendor boundaries
This commit is contained in:
1 parent
beaa93d6cc
commit
da64aae267
28 files changed
+7075
-86
No files matched your search
@@ -853,14 +853,13 @@ function parseTracks(vtts, subtitles) {
|
||||
const parser = new WebVTTParser();
|
||||
return vtts.map((vtt, index) => {
|
||||
const tree = parser.parse(vtt, "metadata");
|
||||
tree.url = subtitles[index].url;
|
||||
tree.name = subtitles[index].name;
|
||||
return tree;
|
||||
return { ...tree, url: subtitles[index].url, name: subtitles[index].name };
|
||||
});
|
||||
}
|
||||
function serializeTracks(trees) {
|
||||
const cues = [];
|
||||
for (const tree of trees) {
|
||||
for (const selected of trees) {
|
||||
const tree = selected;
|
||||
for (const cue of tree.cues) {
|
||||
cues.push({
|
||||
...cue,
|
||||
|
||||
Reference in new issue
Block a user