Lighbox an Ajax not working loding video

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #10040843
    hpnmax
    Participant

    Hello,
    I’ve tried getting the lightbox window and Ajax content window to work with no luck. In both case a need to load video on full window with controls.
    I have tried with a YouTube video and an HTML Video and in both cases it doesn’t work for me.

    I’m not an expert, I’m a designer. Something happens that they do not load correctly.
    I used the lightbox template that comes with “Porto” (element-lightboxes.html) as a reference to load the content but it didn’t work, adding it to the file I’m working on.
    I need instructions on how to do it please.

    Load button
    Youtube and ajax load
    youtube and ajax video doest work either
    Hope can help



    Template Version: 9.7.0
    #10040847
    Support
    Keymaster

    Hi, please try with the following code:

    <a class="popup-youtube" href="https://www.youtube.com/watch?v=bY-mOdgz7zQ">Youtube Link</a>

    (js/custom.js)

    $(document).ready(function() {
    	$('.popup-youtube').magnificPopup({
        type: 'iframe'
      });
    });

    Let me know if you need further assistance.

    Best Regards,

    Okler Themes


    #10040849
    hpnmax
    Participant
    This reply has been marked as private.
    #10040852
    Support
    Keymaster

    Hi, here’s another example:

    <a href="#video-01" id="openLocalVideo">Open Video</a>
    
    <div id="video-01" class="video-popup mfp-hide text-center">
        <video preload="auto">
            <source src="video/memory-of-a-woman.mp4" type="video/mp4">
        </video>
    </div>

    JS: (js/custom.js)

    $('#openLocalVideo').magnificPopup({
        type: 'inline',
        callbacks: {
            open: function() {
                $(this.content).find('video')[0].play();
            },
            close: function() {
                $(this.content).find('video')[0].load();
            }
        }
    });

    Kind Regards.


Viewing 4 posts - 1 through 4 (of 4 total)

This topic is marked as "RESOLVED" and can not rceive new replies.