pupunzi / jquery.mb.YTPlayer

use a custom yutube player for a video as background on jQuery framework
https://pupunzi.com/mb.components/mb.YTPlayer/demo/demo.html
1.32k stars 429 forks source link

Possible to pass optimizeDisplay in button? #456

Closed HCMF closed 4 years ago

HCMF commented 4 years ago

I am trying to have the initial video that loads display with optimizeDisplay: true and then when the user clicks a button to change the video the new video displays with optimizeDisplay: false

But I can't seem to get this to take effect... Is it not possible to pass this property?

<a class="switch" href='javascript:;' onclick="jQuery('#wc-video').YTPChangeVideo({videoURL:'https://www.youtube.com/watch?v=xxx',optimizeDisplay:'false'})">
English  </a>
HCMF commented 4 years ago

Sorry my bad... optimizeDisplay is boolean and needs no quotes: <a class="switch" href='javascript:;' onclick="jQuery('#wc-video').YTPChangeVideo({videoURL:'https://www.youtube.com/watch?v=xxx',optimizeDisplay:false})"> English </a>