fix(xgplayer-subtitles): 修复时间戳兼容问题

This commit is contained in:
hongqiongxing 2024-05-21 18:16:46 +08:00 committed by gemstone
parent f144b3b47b
commit 4579ed23bf
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,6 @@
# 版本更新记录
## 3.0.19
>* feat(subtitles): 时间戳解析适配xxx:xx.xxx --> xxx:xx.xxx
## 3.0.10
>* feat(subtitles): 字幕展示增加逐字展示能力
## 1.0.24

View File

@ -16,7 +16,7 @@ const ASS_CHECK = /^\[Script Info\].*/
const TIME_REGEX_LIST = [
/[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,3}:[0-9]{2}:[0-9]{2}\.[0-9]{1,3}/,
/[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,2}:[0-9]{2}\.[0-9]{1,3}/,
/[0-9]{1,3}:[0-9]{2}\.[0-9]{1,3}-->[0-9]{1,3}:[0-9]{2}\.[0-9]{1,3}/,
/[0-9]{1,2}\.[0-9]{1,3}-->[0-9]{1,2}\.[0-9]{1,3}/
]
// const LANG_REGEX = /^(<?.+?>(([\s\S])*?)<\/?.+?>)$/