CSS-Tricks / AnythingSlider

A jQuery Slider plugin for anything.
http://css-tricks.github.io/AnythingSlider/
GNU Lesser General Public License v3.0
1.15k stars 380 forks source link

Disabling YouTube's 'related videos' not working #553

Closed kknights closed 11 years ago

kknights commented 11 years ago

Hi again!

Within my slider, I have a number of YouTube videos. To each URL, I have ?rel=0 appended to the URL as my client doesn't want other videos than his showing at the end. This works properly when embedded into a plain HTML page, however when placed within the slider it doesn't and the related videos appear.

I've gone through the documentation and searched this forum (as well as others) for a solution, but it doesn't sound like anyone's needed to have this done before as no one is asking for help.

http://jsfiddle.net/kknights/gewWn/12/

kknights commented 11 years ago

Problem solved. Posting the solution.

Step 1: remove ?rel=0 from the url. Step 2: amend the javascript so that YouTube custom parameters are included:

.anythingSliderVideo({
  youtubeParams: {
    rel: 0
  }
});

Ta-da!

Mottie commented 11 years ago

Whew, I'm glad you figured that out ;)

kknights commented 11 years ago

Believe me, me too! =)