diff --git a/pages/component/video/video.uvue b/pages/component/video/video.uvue index 30a3084c68e2ee7566e14da1b808c87858426d6a..2c139c5b346184f82cc30b54d336095944013f1b 100644 --- a/pages/component/video/video.uvue +++ b/pages/component/video/video.uvue @@ -288,7 +288,7 @@ this.pageGesture = !this.pageGesture; console.log("pageGesture -> " + this.pageGesture) }, - setDirection: function (direction: number) { + setDirection: function (direction : number) { this.direction = direction; console.log("direction -> " + this.direction) }, @@ -361,40 +361,40 @@ console.log("header -> " + this.header) }, // 事件 - onPlay: function (res : any) { - console.log(JSON.stringify(res)); + onPlay: function (res : Event) { + console.log(res.type); this.isPlaying = true; this.isPause = false; }, - onPause: function (res : any) { - console.log(JSON.stringify(res)); + onPause: function (res : Event) { + console.log(res.type); this.isPlaying = false; this.isPause = true; }, - onEnded: function (res : any) { - console.log(JSON.stringify(res)); + onEnded: function (res : Event) { + console.log(res.type); }, - onTimeUpdate: function (_ : any) { - // console.log(JSON.stringify(res)); + onTimeUpdate: function (res : VideoTimeUpdateEvent) { + console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onFullScreenChange: function (res : any) { - console.log(JSON.stringify(res)); + onFullScreenChange: function (res : VideoFullScreenChangeEvent) { + console.log(res.type + " -> " + JSON.stringify(res.detail)); this.isFullScreen = !this.isFullScreen; }, - onWaiting: function (res : any) { - console.log(JSON.stringify(res)); + onWaiting: function (res : Event) { + console.log(res.type); }, - onError: function (res : any) { - console.log(JSON.stringify(res)); + onError: function (res : VideoErrorEvent) { + console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onProgress: function (res : any) { - console.log(JSON.stringify(res)); + onProgress: function (res : VideoProgressChangeEvent) { + console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onFullScreenClick: function (res : any) { - console.log(JSON.stringify(res)); + onFullScreenClick: function (res : VideoFullScreenClickEvent) { + console.log(res.type + " -> " + JSON.stringify(res.detail)); }, - onControlsToggle: function (res : any) { - console.log(JSON.stringify(res)); + onControlsToggle: function (res : VideoControlsToggleEvent) { + console.log(res.type + " -> " + JSON.stringify(res.detail)); }, // 自动化测试 playTest: function () { @@ -424,4 +424,4 @@ width: 750rpx; height: 400rpx; } - + \ No newline at end of file