Embed YouTube NoCookie-HD-Videos

aw's Avatar

aw

24 Aug, 2012 04:41 PM

Nocookie-vidoes dosen't work and the additional parameters too (fullwidth-slider in newest codecanyon-version in my case)!

e.g.:

<img class="rsImg" src="img/cover.png" alt="" data-rsVideo="https://www.youtube-nocookie.com/v/N0m1XmvBey8?hd=1&rel=0&fs=1&autoplay=1&showinfo=0&showsearch=0" />

This works, but ignores all additional parameters:

<img class="rsImg" src="img/cover.png" alt="" data-rsVideo="http://www.youtube.com/watch?v=N0m1XmvBey8?hd=1&rel=0&fs=1&autoplay=1&showinfo=0&showsearch=0" />

Just for testing:
https://www.youtube-nocookie.com/v/N0m1XmvBey8?hd=1&amp;rel=0&amp;f...
http://www.youtube.com/watch?v=N0m1XmvBey8?hd=1&amp;rel=0&amp;fs=1&...

  1. Support Staff 1 Posted by Dmitry Semenov on 24 Aug, 2012 04:57 PM

    Dmitry Semenov's Avatar

    Hi,

    From URL slider gets only video id. If you wish parameters, you should modify youTubeCode option. http://dimsemenov.com/plugins/royal-slider/documentation/#video

    Dmitry

  2. 2 Posted by aw on 24 Aug, 2012 09:43 PM

    aw's Avatar

    Hi Dimitry,

    I have tested this too... and it doesn't run.
    If I used the normal YT-URL with parameters, it works in Safari (e. g. HD-preselection) but not in FF.

    If I use the parameters in jQuery-config with nocookie-URL, the video doesn't load after I clicked on "Play". It does nothing.

  3. Support Staff 3 Posted by Dmitry Semenov on 25 Aug, 2012 08:49 AM

    Dmitry Semenov's Avatar

    The slider just displays video iframe with format that you set in youTubeCode option, pretty straightforward. From URL that you pass in data-rsVideo attribute it gets only video ID.

    Dmitry

  4. 4 Posted by aw on 27 Aug, 2012 08:19 AM

    aw's Avatar

    Okay, one more time :D

    1st way: Link in Slider --> doesn't work with parameters.
    2nd way: iframe-"link" with %id% and only the "id" in attribute --> doesn't work with parameters.

  5. Support Staff 5 Posted by Dmitry Semenov on 27 Aug, 2012 05:06 PM

    Dmitry Semenov's Avatar

    Oh, I'll explain.

    1. First you set normal URL http://www.youtube.com/watch?v=N0m1XmvBey8 in data-rsVideo

    2. Then you modify the YouTube code in initialization (add no-cookie url and HD param):

       jQuery(document).ready(function($) {
           $(".royalSlider").royalSlider({
               video: {
                   youTubeCode: '<iframe src="https://www.youtube-nocookie.com/embed/%id%?rel=1&autoplay=1&showinfo=0&hd=1" frameborder="no"></iframe>'
               }
           });  
       });
      
  6. Dmitry Semenov closed this discussion on 29 Aug, 2012 11:51 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac