From a3ab3afe580daa80e9689f6e513e75a385f75bac Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Sun, 14 Aug 2022 21:00:37 +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