WordPress.org

Ready to get started?Download WordPress

Forums

WP Video Lightbox
[resolved] Prevent related videos from showing after play (3 posts)

  1. SpenceDesign
    Member
    Posted 1 year ago #

    First of all, thanks for this plugin, it works great save for one issue.

    Wondering if there is a way to prevent related videos from showing after the YouTube video finishes playing. YouTube provides this option when using iframe embed (they amend the video id with "?rel=0", but when used along with the video ID, it does not work with the plugins shortcode:

    Example shortcode: [video_lightbox_youtube video_id="VideoidHere?rel=0" width=640 height=360 anchor="Video Link"]

    If you replace "VideoidHere" with a video ID it still shows related videos after the video finishes playing, which does not work for my use.

    Any thoughts on a work around for this?

    BTW, I have purchased and use your eStore plugin and love it.

    Thanks for any help you can provide with this issue.

    -SDesign

    http://wordpress.org/extend/plugins/wp-video-lightbox/

  2. SpenceDesign
    Member
    Posted 1 year ago #

    I should read the usage file more closely. Here is the solution:

    <a href="http://www.youtube.com/embed/VIDEOid?rel=0?iframe=true&width=640&height=360" rel="wp-video-lightbox[iframes]">Video Link</a>

    I hope this is helpful to someone else. Now if I could only figure out how to decrease the side-of-page padding as the videos are too small on mobile devices due to the large amount of padding.

  3. YellowSnower
    Member
    Posted 10 months ago #

    Thanks SpenceDesign! This was the solution I needed! The trick was to change the youtube URL to youtube.com/embed/VIDEOid and to add the iframe=true parameter to the URL. I also made sure to change the autoplay parameter to true in the /wp-content/plugins/wp-video-lightbox/js/video-lightbox.js file (line 17 for me)

    Here is what mine looks like
    <a href="http://www.youtube.com/embed/VIDEOid?rel=0&autoplay=1&iframe=true&width=1000&height=560" rel="wp-video-lightbox[iframes]"></a>

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.