From 5e16ef78eadedd512ee728d07f686bd475cc7bda Mon Sep 17 00:00:00 2001 From: wanganxp Date: Thu, 26 Oct 2023 05:05:20 +0800 Subject: [PATCH] =?UTF-8?q?video=E5=AF=B9=E8=B1=A1=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=96=B9=E5=BC=8F=E8=8E=B7=E5=8F=96=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B5=8B=E8=AF=95=E4=BE=8B=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/video/video.uvue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/component/video/video.uvue b/pages/component/video/video.uvue index 0d0cccc3..30a3084c 100644 --- a/pages/component/video/video.uvue +++ b/pages/component/video/video.uvue @@ -223,7 +223,8 @@ }, pause: function () { console.log("pause"); - this.videoContext?.pause(); + (uni.getElementById("video") as UniVideoElement).pause(); //as写法测试。注意id不对时as会崩溃 + // this.videoContext?.pause(); }, seek: function (pos : number) { console.log("seek -> " + pos); @@ -239,7 +240,8 @@ }, stop: function () { console.log("stop"); - this.videoContext?.stop(); + uni.getElementById("video")?.stop(); //泛型写法测试 + // this.videoContext?.stop(); }, sendDanmu: function (danmu : Danmu) { console.log("sendDanmu -> " + danmu); -- GitLab