Lightbox facebook iframe embedding video

I am trying to create a Magnific Popup (lightbox) to load facebook frameworks. I used to use PrettyPhoto, however I wanted to make a switch. Oddly enough, using the same methodology that I have in the following codef, the iframe cannot properly load (for example, within the player) for Facebook. enter image description hereI realized that the same thing happened with PrettyPhoto, and I believe that Facebook could make a difference.

<a class="video" href="http://www.facebook.com/video/embed/?_rdr=p&video_id=1291445700871053">Open Facebook video here</a>

Js

$('.video').magnificPopup({
  type: 'iframe'
});

Does anyone know how to mitigate this problem?

http://codepen.io/afagard/pen/YWyoOP

+4
source share
1 answer

, Facebook HTML-, - embed_html.

, :

https://www.facebook.com/v2.5/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fvideo.php%3Fv%3D{VIDEO_ID}

( {VIDEO_ID} ).

:

<!doctype html>
    <html lang="en">
    <head>
        <title>Video Test</title>
        <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
        <script type="text/javascript" src="http://dimsemenov-static.s3.amazonaws.com/dist/jquery.magnific-popup.min.js"></script>
        <link rel="stylesheet" type="text/css" href="http://dimsemenov-static.s3.amazonaws.com/dist/magnific-popup.css" />
    </head>
    <body>
        <a class="video" href="https://www.facebook.com/v2.5/plugins/video.php?href=https%3A%2F%2Fwww.facebook.com%2Fvideo.php%3Fv%3D1291445700871053
">Open Facebook video here</a>
        <br><br><br>
        <a class="video" href="https://www.youtube.com/watch?v=dQw4w9WgXcQ">Open Youtube video here</a>
        <script type="text/javascript">
            $('.video').magnificPopup({
                type: 'iframe'
            });
        </script>
    </body>
    </html>
Hide result
+4

All Articles