diff --git a/pages/component/video/video-format.uvue b/pages/component/video/video-format.uvue
index b2bfe897c4ed67f27bd3c82e8732ae9ecf73bd29..42dfc27c53a7e8691078c32426473a820d5b3574 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 93e82ff88e275a04157bb62ae25125fbb74ca786..895f3b66540ff40e128da5e4acebb21279454a06 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));
}
}