This commit is contained in:
yumoqing 2024-10-10 11:21:32 +08:00
parent 9ee30fc3ea
commit 60a708f0da

View File

@ -37,7 +37,6 @@ bricks.Video = class extends bricks.Layout {
this.add_widget(this.video_body); this.add_widget(this.video_body);
schedule_once(this.create_player.bind(this), 0.1); schedule_once(this.create_player.bind(this), 0.1);
this.hidedbtn = new bricks.Button({text:'click me'}); this.hidedbtn = new bricks.Button({text:'click me'});
this.hidedbtn.hide();
this.hidedbtn.bind('click', this.play.bind(this)); this.hidedbtn.bind('click', this.play.bind(this));
this.add_widget(this.hidedbtn); this.add_widget(this.hidedbtn);
} }
@ -69,6 +68,7 @@ bricks.Video = class extends bricks.Layout {
this.hidedbtn.dispatch('click'); this.hidedbtn.dispatch('click');
} }
play(){ play(){
this.hidedbtn.hide();
console.log('Video:play() called....'); console.log('Video:play() called....');
this.player.play(); this.player.play();
} }