Magnific Popup - Error when opening a you tube video

前端 未结 5 982
生来不讨喜
生来不讨喜 2021-01-06 04:12

Can not get a video to play in the magnific pop up window. When I use class=iframe, the page will redirect to youtube and play the video. But when I use

5条回答
  •  北海茫月
    2021-01-06 04:29

    Something I found with "v" argument, I see patterns in core file "jquery.magnific-popup.js"

    patterns: {
        youtube: {
            index: 'youtube.com',
                id: 'v=',
                src: '//www.youtube.com/embed/%id%?autoplay=1'
            }
    }
    

    Frontend link:

    youtube link
    

    I gave link to A tag "https" url but not work.

    youtube link
    

    I see valid url "v" argument with video code "YQHsXMglC9A" and it's works :)
    so we just need to change "v" argument value.

提交回复
热议问题