Skip to content

Commit 43e53ee

Browse files
committed
Merge remote-tracking branch 'l3/MC-40817' into L3-PR-20210310
2 parents e8c310a + 03187b5 commit 43e53ee

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

lib/web/fotorama/fotorama.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,14 @@ fotoramaVersion = '4.6.4';
19031903
});
19041904
}
19051905

1906+
/**
1907+
* Checks if current media object is YouTube or Vimeo video stream
1908+
* @returns {boolean}
1909+
*/
1910+
function isVideo() {
1911+
return $((that.activeFrame || {}).$stageFrame || {}).hasClass('fotorama-video-container');
1912+
}
1913+
19061914
function allowKey(key) {
19071915
return o_keyboard[key];
19081916
}
@@ -3149,8 +3157,7 @@ fotoramaVersion = '4.6.4';
31493157
if (o_allowFullScreen && !that.fullScreen) {
31503158

31513159
//check that this is not video
3152-
var isVideo = $((that.activeFrame || {}).$stageFrame || {}).hasClass('fotorama-video-container');
3153-
if(isVideo) {
3160+
if(isVideo()) {
31543161
return;
31553162
}
31563163

@@ -3739,7 +3746,10 @@ fotoramaVersion = '4.6.4';
37393746
}
37403747

37413748
activeIndexes = [];
3742-
detachFrames(STAGE_FRAME_KEY);
3749+
3750+
if (!isVideo()) {
3751+
detachFrames(STAGE_FRAME_KEY);
3752+
}
37433753

37443754
reset.ok = true;
37453755

0 commit comments

Comments
 (0)