fix: 修复视频插件无法播放mkv封装格式的视频的问题

This commit is contained in:
539943419 committed 2024-12-19 22:28:01 +08:00
1 parent 8f8d098faa
commit 47590ec0db
4 files changed
+12 -2

No files matched your search

+5 -1
View File
@@ -30,7 +30,11 @@ const pluginConfig: registerComponentOption = {
'yaml',
'txt',
'xml',
'vue'
'vue',
'srt',
'vtt',
'ass',
'ssa'
]) {
if (vFiles[0].name.endsWith(end)) {
return true
@@ -298,7 +298,7 @@ function ssaToVtt(ssaContent: string): string {
const findVideo = (vFiles: VirtualFile[]) =>
uniq(vFiles.filter((v) => {
for (let s of ['mp4', 'mp3']) {
for (let s of ['mp4', 'mp3', 'mkv']) {
if (v.name.endsWith(s)) {
return true
}