From dc01a523f7b9653c5c2ee30cdef3656aa6283d6c Mon Sep 17 00:00:00 2001 From: zhangsir Date: Wed, 9 Oct 2024 12:15:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=86=E9=A2=91=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/VideoPlayer/index.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/VideoPlayer/index.vue b/src/components/VideoPlayer/index.vue index bf7b6f2f..8e85c509 100644 --- a/src/components/VideoPlayer/index.vue +++ b/src/components/VideoPlayer/index.vue @@ -356,6 +356,17 @@ export default { this.isCursorStatic = false; this.timeoutControlsHint = 2000; }); + this.videoDom.addEventListener('loadstart', function(){ + console.log('\x1b[34m%s\x1b[0m','*****************视频加载中**************') + }) + + this.videoDom.addEventListener('loadeddata', function(){ + console.log('\x1b[32m%s\x1b[0m','*****************加载完毕*************') + }) + + this.videoDom.addEventListener('error', function(){ + console.log('\x1b[31m%s\x1b[0m','*****************加载失败**********') + }) // 监听全屏事件的变化,保存数据 window.addEventListener("fullscreenchange", () => { this.isFullscreen = this.isFullScreen();