Skip to content

Commit f389d50

Browse files
committed
MC-40817: Unable to open fullscreen video using mobile browsers
1 parent 841eeb6 commit f389d50

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/web/fotorama/fotorama.js

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

1906+
// check if current media object is YouTube or Vimeo video stream
1907+
function isVideo() {
1908+
return $((that.activeFrame || {}).$stageFrame || {}).hasClass('fotorama-video-container');
1909+
}
1910+
19061911
function allowKey(key) {
19071912
return o_keyboard[key];
19081913
}
@@ -3149,8 +3154,7 @@ fotoramaVersion = '4.6.4';
31493154
if (o_allowFullScreen && !that.fullScreen) {
31503155

31513156
//check that this is not video
3152-
var isVideo = $((that.activeFrame || {}).$stageFrame || {}).hasClass('fotorama-video-container');
3153-
if(isVideo) {
3157+
if(isVideo()) {
31543158
return;
31553159
}
31563160

@@ -3740,7 +3744,9 @@ fotoramaVersion = '4.6.4';
37403744

37413745
activeIndexes = [];
37423746

3743-
// detachFrames(STAGE_FRAME_KEY);
3747+
if (!isVideo()) {
3748+
detachFrames(STAGE_FRAME_KEY);
3749+
}
37443750

37453751
reset.ok = true;
37463752

0 commit comments

Comments
 (0)