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.3k stars 431 forks source link

The video is autoplaying #494

Closed pascarel closed 1 year ago

pascarel commented 1 year ago

Hi, I'm using your plugin a lot of time, thx for it, is a great job. AT the last project I had the next issue: the video is autoplaying by default at page loading, but i put in the attributes: autoplay: false. I'm usign the code for an custom player on page. How to prevent to do that? I attached the code I use. Thx a lot. Screenshot 2023-03-28 at 11 28 34

pupunzi commented 1 year ago

@pascarel The auto play attribute is CamelCase: autoPlay:false That should solve the problem.

pascarel commented 1 year ago

yes, that was the mistake, sorry for being so careless. thanks for the quick reply

pascarel commented 1 year ago

sorry again, but why the iframe why is it growing so much? i'll attach the screenshot. Screenshot 2023-03-28 at 15 31 34 Screenshot 2023-03-28 at 15 31 25

pupunzi commented 1 year ago

@pascarel Did you try those two options: /* optimizeDisplay (bool) The video always fit the containment without displaying the black strips / optimizeDisplay: true,

        /**
         abundance (bool)
         the abundance of the video size
         */
        abundance: 0.3,
pascarel commented 1 year ago

abundance: 0.1 did the trick. Thx again.