fix: 修复flv格式的视频在转码后无法播放的问题
This commit is contained in:
parent
a0ae30b41b
commit
2b5dca7d67
@ -146,7 +146,7 @@ export default {
|
|||||||
this.option.url = videoUrl
|
this.option.url = videoUrl
|
||||||
|
|
||||||
if (this.file.m3u8) {
|
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())) {
|
if (supported.includes(this.file.suffix.toLowerCase())) {
|
||||||
this.option.quality = [
|
this.option.quality = [
|
||||||
{
|
{
|
||||||
@ -161,7 +161,8 @@ export default {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
this.option.customType = {
|
this.option.customType = {
|
||||||
m3u8: this.playM3u8
|
m3u8: this.playM3u8,
|
||||||
|
flv: this.playFlv
|
||||||
}
|
}
|
||||||
this.option.plugins = [
|
this.option.plugins = [
|
||||||
artplayerPluginVttThumbnail({
|
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.videoLink = window.location.origin + originUrl
|
||||||
this.title = this.file.name
|
this.title = this.file.name
|
||||||
this.option.id = this.file.id
|
this.option.id = this.file.id
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user