mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-19 03:11:20 -08:00
移除深度合并依赖
This commit is contained in:
1 parent
dc8405403c
commit
b943bcde99
13 files changed
+232
-267
No files matched your search
@@ -1,19 +0,0 @@
|
||||
export function srtToVtt(srtText) {
|
||||
return 'WEBVTT \r\n\r\n'.concat(
|
||||
srtText
|
||||
.replace(/\{\\([ibu])\}/g, '</$1>')
|
||||
.replace(/\{\\([ibu])1\}/g, '<$1>')
|
||||
.replace(/\{([ibu])\}/g, '<$1>')
|
||||
.replace(/\{\/([ibu])\}/g, '</$1>')
|
||||
.replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g, '$1.$2')
|
||||
.concat('\r\n\r\n'),
|
||||
);
|
||||
}
|
||||
|
||||
export function vttToBlob(vttText) {
|
||||
return URL.createObjectURL(
|
||||
new Blob([vttText], {
|
||||
type: 'text/vtt',
|
||||
}),
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user