From 271ca6cb0ee2ff0a789bf74d1821e7891a7043bb Mon Sep 17 00:00:00 2001
From: inleft <inleft@qq.com>
Date: Tue, 30 Aug 2022 21:57:42 +0800
Subject: [PATCH] 自定义表情组件

---
 src/components/mini/box15-videoPlayBox.vue |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/components/mini/box15-videoPlayBox.vue b/src/components/mini/box15-videoPlayBox.vue
index 99132eb..8e56ba5 100644
--- a/src/components/mini/box15-videoPlayBox.vue
+++ b/src/components/mini/box15-videoPlayBox.vue
@@ -51,12 +51,14 @@
 <script>
 	import Hls from 'hls.js'
 	import DPlayer from 'dplayer'
+	import myConstant from "../../config/myConstant.js"
 
 	export default {
 		data() {
 			return {
 				disabledPointer: false,
 				dp: null,
+				hls: null,
 				playHistory: [],
 				playRecordIds: [],
 				volumeInit: 0.1,
@@ -65,13 +67,12 @@
 				currentTime: 0,
 				duration: 0,
 				playingVideoData: {
-					pic: "http://t.inleft.com/share/media_photo/idea_beijing.jpg",
+					pic: "",
 					url: "",
 					type: "normal",
 					title: "",
 					id: ""
 				},
-				hls: null,
 			}
 		},
 		mounted() {
@@ -173,12 +174,16 @@
 					return
 				}
 
-				if (videoData.url != null && videoData.urlL != "" && videoData.url.endsWith("m3u8")) {
+				if (videoData.url != null && videoData.url != "" && videoData.url.endsWith("m3u8")) {
 					videoData.type = "customHls";
 				} else {
 					videoData.type = "normal";
 				}
 
+				if (videoData.pic === null || videoData.pic == ''){
+					videoData.pic = myConstant.defaultBGVideo;
+				}
+
 				//重要!!防止hls类型视频在切换后不停在后台缓存
 				if (this.hls != null) {
 					this.hls.destroy();

--
Gitblit v1.9.1