Skip to content

Commit c1f7853

Browse files
committed
Merge pull request #74 from ulaharbmg/JS-355
JS-355: Video image should be shown while video is loading in fullscreen
2 parents ecb41c7 + 838b034 commit c1f7853

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@ define([
524524

525525
$(this).removeClass('video-unplayed');
526526
$(this).find('.' + PV).productVideoLoader();
527-
$(this).find('img').hide();
528527

529528
if (!self.isFullscreen) {
530529
self._showCloseVideo();

app/code/Magento/ProductVideo/view/frontend/web/js/load-player.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ define(['jquery', 'jquery/ui'], function ($) {
189189
*/
190190
'onReady': function onPlayerReady() {
191191
self._player.getDuration();
192+
self.element.closest('.fotorama-video-container').find('img').hide();
192193
},
193194

194195
/**
@@ -334,7 +335,8 @@ define(['jquery', 'jquery/ui'], function ($) {
334335
this._player = window.$f(this.element.children(':first')[0]);
335336

336337
// Froogaloop throws error without a registered ready event
337-
this._player.addEvent('ready', function () {
338+
this._player.addEvent('ready', function (id) {
339+
$('#' + id).closest('.fotorama-video-container').find('img').hide();
338340
});
339341
},
340342

0 commit comments

Comments
 (0)