From af535b633a544b2dcd32c39b0bffaeaa011be130 Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Wed, 24 Jan 2024 19:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0video=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/video/video-format.uvue | 4 ++-- pages/component/video/video.uvue | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pages/component/video/video-format.uvue b/pages/component/video/video-format.uvue index b2bfe897..42dfc27c 100644 --- a/pages/component/video/video-format.uvue +++ b/pages/component/video/video-format.uvue @@ -10,7 +10,7 @@ {{item.format}} + @error="onError(item.format, $event as UniVideoErrorEvent)"> 暂不支持的格式 @@ -92,7 +92,7 @@ } }, methods: { - onError: function (format : string, e : VideoErrorEvent) { + onError: function (format : string, e : UniVideoErrorEvent) { console.log(format + ":" + JSON.stringify(e)); if (format != "错误路径") { this.isError = true; diff --git a/pages/component/video/video.uvue b/pages/component/video/video.uvue index 93e82ff8..895f3b66 100644 --- a/pages/component/video/video.uvue +++ b/pages/component/video/video.uvue @@ -373,39 +373,39 @@ console.log("header -> " + this.header) }, // 事件 - onPlay: function (res : Event) { + onPlay: function (res : UniEvent) { console.log(res.type); this.isPlaying = true; this.isPause = false; }, - onPause: function (res : Event) { + onPause: function (res : UniEvent) { console.log(res.type); this.isPlaying = false; this.isPause = true; }, - onEnded: function (res : Event) { + onEnded: function (res : UniEvent) { console.log(res.type); }, - onTimeUpdate: function (res : VideoTimeUpdateEvent) { + onTimeUpdate: function (res : UniVideoTimeUpdateEvent) { console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onFullScreenChange: function (res : VideoFullScreenChangeEvent) { + onFullScreenChange: function (res : UniVideoFullScreenChangeEvent) { console.log(res.type + " -> " + JSON.stringify(res.detail)); this.isFullScreen = !this.isFullScreen; }, - onWaiting: function (res : Event) { + onWaiting: function (res : UniEvent) { console.log(res.type); }, - onError: function (res : VideoErrorEvent) { + onError: function (res : UniVideoErrorEvent) { console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onProgress: function (res : VideoProgressEvent) { + onProgress: function (res : UniVideoProgressEvent) { console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onFullScreenClick: function (res : VideoFullScreenClickEvent) { + onFullScreenClick: function (res : UniVideoFullScreenClickEvent) { console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onControlsToggle: function (res : VideoControlsToggleEvent) { + onControlsToggle: function (res : UniVideoControlsToggleEvent) { console.log(res.type + " -> " + JSON.stringify(res.detail)); } } -- GitLab