This commit is contained in:
yumoqing 2024-10-10 15:12:40 +08:00
parent dff8922a08
commit 66dc91a68b

View File

@ -28,6 +28,7 @@ bricks.Video = class extends bricks.Layout {
{
vtype:
url:
fullscreen:
autoplay:
}
*/
@ -74,12 +75,15 @@ bricks.Video = class extends bricks.Layout {
this.player.play();
}
set_fullscreen(){
var co = this.player.getChild('FullscreenToggle');
if (!co){
console.log('video.js can not found FullscreenToggle');
return;
if (this.fullscreen){
if (!this.player.isFullscreen()) {
this.player.requestFullscreen();
}
} else {
if (this.player.isFullscreen()) {
this.player.exitFullscreen();
}
}
co.trigger('click');
}
create_player(){
if(this.url){