https://github.com/dimsemenov/Magnific-Popup/issues/725 Yah MP have patterns Late to the party, in case someone needs to use the actual embed URL for Magnific, here is my process: Write a function that gets the input URL, checks it's format and then ensures that the /embed/ url is returned. In Magnific markup always use the processed URL which is in the embed format. Add the following patterns to magnific, to essentially use the input URL as the url without processing it further: // Video popup, Backend enforces embed URL before it gets here. $('.js-popup-video').magnificPopup({ type: 'iframe', iframe: { patterns: { youtube: { index: 'youtube.com/', id: function (url) ...
Some tribes of the programmer clan.