Closed roborourke closed 1 year ago
When you expect user to open youtube video, video will take some time to load. And we have 2 ways of showing youtube videos:
So you can choose. I personally recommend iframe. Check demo for methods.
Closing out - we used the iframe approach instead of API, thanks for the response.
Hey, this is a great lightweightt library - thanks for open sourcing it.
One thing that's come up for us is around performance and loading iframes in straight away. I'm wondering if the simple addition of
loading="lazy"
on the iframes would be enough to make this possible.Alternatively could the youtube script loading and iframe creation be deferred to when the lightbox is first opened perhaps?