Okay
  Public Ticket #858586
Youtube &rel=0 not working
Closed

Comments

  • Patrick started the conversation

    Hey,

    We added &rel=0 to some of our videos to test, and it doesn't seem to work (related videos still showing at end)

    Sometimes these videos are a little quirky, so trying to prevent them altogether 

    https://ctileadership.com/why-us/physician-testimonials/

    the first 2 videos we added the &rel=0 (if other parameters first) or ?rel=0 if it's first param - no dice

    -Patrick

  •  8,996
    Tahir replied

    Hey ,

    I dont see any such rel parameter in there: http://prntscr.com/c4jlkb ?. 

    Bes.t


    ThemeNectar Support Team 

  • Patrick replied

    EXACTLY!

    Hence the theme is creating the embed maybe?

    See screenshot - I added rel to no avail - doesn't affect what's spit out even after clearing all caches and other stuff

    -Pat

     

  •  21
    Simon replied

    I'm getting the same issue at:

    http://bes2016.wpengine.com/?page_id=294

  • Patrick replied

    Yeah - repeatable issue - Simon's site showed me sexy pokemon among others after o.O

    I doubt our clients will be as amused

  •  21
    Simon replied

    As Patrick said earlier, for some reason it is stripping the rel=0 out when the page gets published.

  •  21
    Simon replied

    If you use the YouTube embed code and the 'Raw Html' shortcode it works perfectly.


    There just appears to be a bug with the official video embed option but the result above is exactly the same.

  • Patrick replied

    Hey,

    It seems that in core plugin files youtube functions are written to just grab the ID, not the url (which may contain passed parameters)

    function vcExtractYoutubeId(url) {
        if ("undefined" == typeof url) return !1;
        var id = url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);
        return null !== id ? id[1] : !1
    }
    
    
    
    function vc_extract_youtube_id( $url ) {
        parse_str( parse_url( $url, PHP_URL_QUERY ), $vars );
    
        if ( ! isset( $vars['v'] ) ) {
            return '';
        }
    
        return $vars['v'];
    }
    
  • Geoffrey replied

    I am having the same issue.

    I have even installed the plugin "Hide YouTube Related Videos" and it's not fixing anything.

    http://seattlewebsearch.com/

    This is a pretty big problem, I definitely can't recommend this theme to clients (even though its my favorite theme) and I'm trying to figure out what to do about my own website now, I can't have random videos being recommended at the end of each video to potential clients, its not professional at all.

  • Geoffrey replied

    The only solution I've found is using a separate plugin and using that to embed the videos, I'm now using Tubelab and it seems to be working. 

    http://seattlewebsearch.com/

    I would still prefer to use to the built in salient lightbox because then I can use my own custom images as thumbnails.

  • Patrick replied

    I mean, if you HAD to work around - you could just use raw HTML VC elements and just paste the iframe embed code provided by YouTube under sharing

    You can click more options and disable related videos and playlists - this will form the proper URL for you

    This way you don't need another plugin hogging up resources and loading itself all over the place (we try to minimize plugins if we can)

    As far as thumbnails - if your YouTube acct is verified you can provide the correct thumbnail THROUGH YouTube (vs theme or plugin)