提交 e5fc6e13 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新video示例

上级 9fb4dddf
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
this.pageGesture = !this.pageGesture; this.pageGesture = !this.pageGesture;
console.log("pageGesture -> " + this.pageGesture) console.log("pageGesture -> " + this.pageGesture)
}, },
setDirection: function (direction: number) { setDirection: function (direction : number) {
this.direction = direction; this.direction = direction;
console.log("direction -> " + this.direction) console.log("direction -> " + this.direction)
}, },
...@@ -361,40 +361,40 @@ ...@@ -361,40 +361,40 @@
console.log("header -> " + this.header) console.log("header -> " + this.header)
}, },
// 事件 // 事件
onPlay: function (res : any) { onPlay: function (res : Event) {
console.log(JSON.stringify(res)); console.log(res.type);
this.isPlaying = true; this.isPlaying = true;
this.isPause = false; this.isPause = false;
}, },
onPause: function (res : any) { onPause: function (res : Event) {
console.log(JSON.stringify(res)); console.log(res.type);
this.isPlaying = false; this.isPlaying = false;
this.isPause = true; this.isPause = true;
}, },
onEnded: function (res : any) { onEnded: function (res : Event) {
console.log(JSON.stringify(res)); console.log(res.type);
}, },
onTimeUpdate: function (_ : any) { onTimeUpdate: function (res : VideoTimeUpdateEvent) {
// console.log(JSON.stringify(res)); console.log(res.type + " -> " + JSON.stringify(res.detail));
}, },
onFullScreenChange: function (res : any) { onFullScreenChange: function (res : VideoFullScreenChangeEvent) {
console.log(JSON.stringify(res)); console.log(res.type + " -> " + JSON.stringify(res.detail));
this.isFullScreen = !this.isFullScreen; this.isFullScreen = !this.isFullScreen;
}, },
onWaiting: function (res : any) { onWaiting: function (res : Event) {
console.log(JSON.stringify(res)); console.log(res.type);
}, },
onError: function (res : any) { onError: function (res : VideoErrorEvent) {
console.log(JSON.stringify(res)); console.log(res.type + " -> " + JSON.stringify(res.detail));
}, },
onProgress: function (res : any) { onProgress: function (res : VideoProgressChangeEvent) {
console.log(JSON.stringify(res)); console.log(res.type + " -> " + JSON.stringify(res.detail));
}, },
onFullScreenClick: function (res : any) { onFullScreenClick: function (res : VideoFullScreenClickEvent) {
console.log(JSON.stringify(res)); console.log(res.type + " -> " + JSON.stringify(res.detail));
}, },
onControlsToggle: function (res : any) { onControlsToggle: function (res : VideoControlsToggleEvent) {
console.log(JSON.stringify(res)); console.log(res.type + " -> " + JSON.stringify(res.detail));
}, },
// 自动化测试 // 自动化测试
playTest: function () { playTest: function () {
...@@ -424,4 +424,4 @@ ...@@ -424,4 +424,4 @@
width: 750rpx; width: 750rpx;
height: 400rpx; height: 400rpx;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册