Skip to content

Commit

Permalink
YouTube - fix fullscreen on iPhone - z-index
Browse files Browse the repository at this point in the history
  • Loading branch information
fvmartin committed Oct 4, 2022
1 parent 82a05a3 commit 47ebd60
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions flowplayer/modules/fullscreen-fix.module.js
Expand Up @@ -147,6 +147,7 @@ flowplayer(function(player, root) {
/*
* iPhone fullscreen is CSS-based and it can't work if the parent elements use CSS transform
* So we get rid of these rules even entering fullscreen and put them back when leaving
* We also reset the z-index as with that the fixed position elements would appear on top of the video
*/
function sanitize_parent_elements( add ) {
var parent = root;
Expand All @@ -156,6 +157,9 @@ flowplayer(function(player, root) {
if( styles.transform ) {
parent.style.transform = add ? 'none' : '';
}
if( styles.zIndex ) {
parent.style.zIndex = add ? 'auto' : '';
}
} catch(e) {}
parent = parent.parentNode;
}
Expand Down

0 comments on commit 47ebd60

Please sign in to comment.