Commit 439fd026 authored by liujiangnan's avatar liujiangnan

feat: 播放器控制条

parent 84c54d2f
This diff is collapsed.
......@@ -176,8 +176,20 @@ cc.Class({
});
this.videoPlayer.node.on('clicked', () => {
console.log('clicked');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`Canvas/Controls`).active = true;
if (this.time1) {
clearTimeout(this.time1);
}
this.time1 = setTimeout(() => {
this.videoPlayer.stayOnBottom = false;
cc.find(`Canvas/Controls`).active = false;
}, 6000);
}
});
this.videoPlayer.node.on('touchstart', () => {
console.log('touchstarted');
if (this.isVideoFull) {
this.videoPlayer.stayOnBottom = true;
cc.find(`Canvas/Controls`).active = true;
......@@ -189,7 +201,7 @@ cc.Class({
cc.find(`Canvas/Controls`).active = false;
}, 6000);
}
})
});
this.videoPlayer.node.on('playing', () => {
console.log('playing');
this.durationLabel.string = this.formatTime(this.videoPlayer.getDuration());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment