bugfix
This commit is contained in:
parent
ca0f6320af
commit
e476f7aa61
@ -59,6 +59,8 @@ bricks.Video = class extends bricks.Layout {
|
||||
auto_play(){
|
||||
this.hidedbtn.dispatch('click');
|
||||
schedule_once(this.disable_captions.bind(this), 2);
|
||||
this.err_cnt = 0;
|
||||
this.player.on('error',this.report_error。bind(this));
|
||||
}
|
||||
play(){
|
||||
this.player.play();
|
||||
@ -71,10 +73,13 @@ bricks.Video = class extends bricks.Layout {
|
||||
|
||||
this.player.ready(this.auto_play.bind(this));
|
||||
this._set_source();
|
||||
if (this.opts.autoplay){
|
||||
// schedule_once(this.auto_play.bind(this), 0.1);
|
||||
;
|
||||
}
|
||||
}
|
||||
report_played(){
|
||||
console.log(this.video_body.cur_url, 'play ok');
|
||||
}
|
||||
report_error(){
|
||||
this.err_cnt += 1;
|
||||
console.log(this.video_body.cur_url, 'play failed', this.err_cnt, 'times');
|
||||
}
|
||||
_set_source(){
|
||||
this.player.src({
|
||||
|
Loading…
Reference in New Issue
Block a user