This commit is contained in:
yumoqing 2024-10-10 11:34:31 +08:00
parent 5fd34667bc
commit da4678c5b8

View File

@ -60,7 +60,7 @@ bricks.Video = class extends bricks.Layout {
}
}
auto_play(){
schedule_once(this._auto_play.bind(this), 0.1);
schedule_once(this._auto_play.bind(this), 0.5);
}
_auto_play(){
console.log('video ready, auto_playing ....');
@ -71,7 +71,7 @@ bricks.Video = class extends bricks.Layout {
this.hidedbtn.dispatch('click');
}
play(){
// this.hidedbtn.hide();
this.hidedbtn.hide();
console.log('Video:play() called....');
this.player.play();
}
@ -82,8 +82,10 @@ bricks.Video = class extends bricks.Layout {
nativeTextTracks:false,
textTrackSettings: false
});
this.player.ready(this.auto_play.bind(this));
this._set_source();
if (self.autoplay || self.auto_play){
this.player.ready(this.auto_play.bind(this));
}
}
}
report_ended(){