mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-29 02:51:20 -08:00
fix(multiple-subtitles): [PKG-MULTI-SUB-07] preserve inline timestamps and caption text
This commit is contained in:
1 parent
da64aae267
commit
7f226ff822
24 files changed
+8660
-132
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import type Artplayer from 'artplayer'
|
||||
import type { Option, Result, Track } from './types'
|
||||
import installCaptionView from './caption'
|
||||
import createLifetime from './lifetime'
|
||||
import { parseTracks, serializeTracks } from './merge'
|
||||
import createRenderer from './render'
|
||||
@@ -33,6 +34,7 @@ export default function artplayerPluginMultipleSubtitles({ subtitles = [] }: Opt
|
||||
return result
|
||||
// A live completed request yields text; cancellation was checked above.
|
||||
trees = parseTracks(vtts as string[], subtitles)
|
||||
installCaptionView(art, lifetime)
|
||||
setTracks(trees)
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user