This commit is contained in:
yumoqing 2024-03-15 20:30:38 +08:00
parent b9dfd63515
commit b5b96efb10

View File

@ -59,7 +59,6 @@ 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(){
@ -78,8 +77,8 @@ bricks.Video = class extends bricks.Layout {
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');
this.dispatch('play_failed', {'src':this.video_body.cur_url, type:this.video_body.cur_vtype});
}
_set_source(){
this.player.src({