From b5b96efb1047ab768f45c91e867561d2664e5102 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 15 Mar 2024 20:30:38 +0800 Subject: [PATCH] bugfix --- bricks/video.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bricks/video.js b/bricks/video.js index 4d9074b..d88e8ee 100755 --- a/bricks/video.js +++ b/bricks/video.js @@ -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({