From: Vincent Vanwaelscappel Date: Tue, 14 Feb 2023 11:23:42 +0000 (+0100) Subject: wait #5730 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=367ef80f50cb22bcced058942f673dacee6acc45;p=fluidbook-html5.git wait #5730 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.video.js b/js/libs/fluidbook/fluidbook.video.js index 8b74dccd..9a1a011f 100644 --- a/js/libs/fluidbook/fluidbook.video.js +++ b/js/libs/fluidbook/fluidbook.video.js @@ -82,7 +82,7 @@ FluidbookVideo.prototype = { var $this = this; $(".videoContainer").each(function () { - if($(this).closest('.rightclone').length>0 && $(this).is(':hidden')){ + if ($(this).closest('.rightclone').length > 0 && $(this).is(':hidden')) { return; } @@ -219,7 +219,7 @@ FluidbookVideo.prototype = { $this.resizeControls(); // Make sure player controls are the right size - if (autoplay) { + if (autoplay) { var promise = player.play(); if (promise !== undefined) { @@ -230,7 +230,7 @@ FluidbookVideo.prototype = { console.log('autoplay nok'); // Autoplay was prevented. }); - }else{ + } else { } } @@ -291,7 +291,9 @@ FluidbookVideo.prototype = { // console.log(id + ' player paused'); // Show play button (ref: http://stackoverflow.com/a/25296575) - this.bigPlayButton.show(); + if (controls) { + this.bigPlayButton.show(); + } // Now the issue is that we need to hide it again if we start playing // So every time we do this, we can create a one-time listener for play events. diff --git a/style/fluidbook.video.less b/style/fluidbook.video.less index 5fd58403..1c2a9c3a 100644 --- a/style/fluidbook.video.less +++ b/style/fluidbook.video.less @@ -65,4 +65,12 @@ .vjs-fluidbook-skin .vjs-big-play-button { background-image: url(@video-bigplay-image); +} + +.vjs-controls-disabled.vjs-fluidbook-skin { + .vjs-big-play-button { + visibility: hidden; + display: none; + opacity: 0; + } } \ No newline at end of file