fix: 修复flv格式的视频在转码后无法播放的问题

This commit is contained in:
jmal 2024-09-20 15:02:39 +08:00
parent a0ae30b41b
commit 2b5dca7d67

View File

@ -146,7 +146,7 @@ export default {
this.option.url = videoUrl
if (this.file.m3u8) {
const supported = ['mp4', 'ogg', 'mkv', 'webm', 'hls', 'mov']
const supported = ['mp4', 'ogg', 'mkv', 'webm', 'hls', 'mov', 'flv']
if (supported.includes(this.file.suffix.toLowerCase())) {
this.option.quality = [
{
@ -161,7 +161,8 @@ export default {
]
}
this.option.customType = {
m3u8: this.playM3u8
m3u8: this.playM3u8,
flv: this.playFlv
}
this.option.plugins = [
artplayerPluginVttThumbnail({
@ -170,14 +171,6 @@ export default {
]
}
if (this.file.contentType.indexOf('flv') > -1) {
this.option.url = originUrl
this.option.quality = []
this.option.customType = {
flv: this.playFlv
}
}
this.videoLink = window.location.origin + originUrl
this.title = this.file.name
this.option.id = this.file.id