dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.38k stars 3.49k forks source link

iFrame .mp4 videos not playing in Safari 12 #1149

Open taoball opened 4 years ago

taoball commented 4 years ago

When opening links to MP4 videos in Safari, the lightbox pops open but the entire media player within has been reduced to a height of 31px. This is because the video element has the class of

class="media-document audio mac" and there are related styles which set the height to the height of the inline-control-bar variable which has a height of 31px;

If the same video is opened directly, outside of the Magnific Popup lightbox, they have the correct class of

class="media-document video mac" which in turn applies the styles of min-width: 700px;

The classes only appear to be applied in Safari and set by the browser? I've researched and these appear to be related to webkit. However, this is only an issue in Safari and I cannot seem to replicate it in Firefox, Chrome etc.

kush-gandhi commented 2 years ago

@taoball Any update on this? I am facing the exact issue and would like to know if you were able to figure out the root cause and fix it? Thanks in advance

joelnewcomer commented 2 years ago

Adding a comment here since I am having this issue as well. Unfortunately, Magnific Popup seems to be abandoned. MP4's don't work in an iframe popup on Safari. The solution I'm about to implement is switching to an inline pop-up instead. This seems to be a Safari bug and I haven't found a work-around. It makes no sense that it would add an .audio class to a video element. Thank you @taoball for shining light on this problem for me. I wish I had a better solution.