bugfix
This commit is contained in:
parent
938b6fa850
commit
9ee30fc3ea
@ -38,6 +38,7 @@ bricks.Video = class extends bricks.Layout {
|
|||||||
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.hide();
|
||||||
|
this.hidedbtn.bind('click', this.play.bind(this));
|
||||||
this.add_widget(this.hidedbtn);
|
this.add_widget(this.hidedbtn);
|
||||||
}
|
}
|
||||||
destroy_resource(params, event){
|
destroy_resource(params, event){
|
||||||
@ -60,6 +61,7 @@ bricks.Video = class extends bricks.Layout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto_play(){
|
auto_play(){
|
||||||
|
console.log('video ready, auto_playing ....');
|
||||||
schedule_once(this.disable_captions.bind(this), 2);
|
schedule_once(this.disable_captions.bind(this), 2);
|
||||||
this.player.on('error',this.report_error.bind(this));
|
this.player.on('error',this.report_error.bind(this));
|
||||||
this.player.on('play', this.report_playok.bind(this));
|
this.player.on('play', this.report_playok.bind(this));
|
||||||
@ -67,6 +69,7 @@ bricks.Video = class extends bricks.Layout {
|
|||||||
this.hidedbtn.dispatch('click');
|
this.hidedbtn.dispatch('click');
|
||||||
}
|
}
|
||||||
play(){
|
play(){
|
||||||
|
console.log('Video:play() called....');
|
||||||
this.player.play();
|
this.player.play();
|
||||||
}
|
}
|
||||||
create_player(){
|
create_player(){
|
||||||
|
Loading…
Reference in New Issue
Block a user