bugfix
This commit is contained in:
parent
195a8de10e
commit
dede41601a
@ -59,7 +59,15 @@ bricks.Video = class extends bricks.Layout {
|
||||
}
|
||||
}
|
||||
}
|
||||
set_muted(flg){
|
||||
if (flg){
|
||||
this.player.muted = true;
|
||||
} else {
|
||||
this.player.muted = false;
|
||||
}
|
||||
}
|
||||
auto_play(){
|
||||
this.set_muted(true);
|
||||
schedule_once(this._auto_play.bind(this), 0.5);
|
||||
}
|
||||
_auto_play(){
|
||||
@ -74,16 +82,19 @@ bricks.Video = class extends bricks.Layout {
|
||||
this.hidedbtn.hide();
|
||||
console.log('Video:play() called....');
|
||||
this.player.play();
|
||||
this.set_muted(false);
|
||||
}
|
||||
create_player(){
|
||||
if(this.url){
|
||||
this.player = videojs(this.video_body.dom_element, {
|
||||
controls:true,
|
||||
autoplay:this.autoplay,
|
||||
muted:true,
|
||||
nativeTextTracks:false,
|
||||
textTrackSettings: false
|
||||
});
|
||||
this._set_source();
|
||||
if (self.autoplay || self.auto_play){
|
||||
if (self.autoplay){
|
||||
this.player.ready(this.auto_play.bind(this));
|
||||
} else {
|
||||
console.log('autoplay=', this.autoplay, this.auto_play);
|
||||
|
Loading…
Reference in New Issue
Block a user