bugfix
This commit is contained in:
parent
15879271ce
commit
6e2b8075c9
@ -69,7 +69,6 @@ bricks.Video = class extends bricks.Layout {
|
||||
}
|
||||
|
||||
auto_play(){
|
||||
return;
|
||||
schedule_once(this._auto_play.bind(this), 0.8);
|
||||
}
|
||||
_auto_play(){
|
||||
@ -78,15 +77,21 @@ bricks.Video = class extends bricks.Layout {
|
||||
console.log('vjs-big-play-button not found');
|
||||
return;
|
||||
}
|
||||
if (play_btn.style.display == 'none'){
|
||||
console.log('playing .............already');
|
||||
return;
|
||||
}
|
||||
console.log('video ready, auto_playing ....');
|
||||
var clickevent = new MouseEvent('click', {
|
||||
'bubbles': true, // 事件是否冒泡
|
||||
'cancelable': true // 事件是否可取消
|
||||
});
|
||||
play_btn.dispatchEvent(clickevent);
|
||||
/*
|
||||
if (this.autounmute && this.player.muted){
|
||||
schedule_once(this.dispatch_mute.bind(this), 0.8);
|
||||
schedule_once(this.dispatch_mute.bind(this), 1);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
play(){
|
||||
@ -159,7 +164,7 @@ bricks.Video = class extends bricks.Layout {
|
||||
this.play_status = 'playok';
|
||||
console.log(this.video_body.cur_url, 'play ok');
|
||||
if (this.autounmute && this.player.muted){
|
||||
schedule_once(this.dispatch_mute.bind(this), 1);
|
||||
schedule_once(this.dispatch_mute.bind(this), 1.5);
|
||||
console.log('mute btn clicked');
|
||||
} else {
|
||||
console.log(this.autounmute, 'player.muted=', this.player.muted);
|
||||
|
Loading…
Reference in New Issue
Block a user