From 916b6bf89465f057532ad8469e4e0002fc361716 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Thu, 18 Aug 2022 16:24:30 +0800 Subject: [PATCH] 日志内页添加头图 --- src/components/mini/box15-videoPlayBox.vue | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/mini/box15-videoPlayBox.vue b/src/components/mini/box15-videoPlayBox.vue index 34690fd..6685448 100644 --- a/src/components/mini/box15-videoPlayBox.vue +++ b/src/components/mini/box15-videoPlayBox.vue @@ -77,7 +77,7 @@ var _this = this; //调整音量 - _this.$message.success("加载完成,请注意音量是否合适..") + _this.$message.success("模块加载完成,请注意音量是否合适..") this.dp.volume(this.volumeInit, true, false); @@ -153,6 +153,11 @@ }, //加载播放 startPlay(videoData) { + if (videoData == null || videoData == undefined) { + this.$message.error("无效资源..") + return + } + //重要!!防止hls类型视频在切换后不停在后台缓存 if (this.hls != null) { this.hls.destroy(); @@ -169,9 +174,8 @@ this.hls = new Hls(); } - setTimeout(() => { - this.dp.switchVideo(this.playingVideoData) - }, 500); + this.dp.switchVideo(this.playingVideoData) + }, //播放器初始化 init() { @@ -196,7 +200,6 @@ }, ], - highlight: [ //进度条上的自定义时间标记 // 进度条时间点高亮 -- Gitblit v1.9.1