First of all, i loved your plugin and it was exactly what i was looking for!
The reason i am contacting you is that i found a small issue when enabling the “Replace Youtube videos by thumbnail” option.
Even though there you always add ?autoplay=1 ( so the video would start playing after the initial click on the image ), you have not added the “allow” attribute with an “autoplay” value.
My workaround was to add the following
,e.setAttribute(\”allow\”, \”accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\”)
again talking about /vendor/wp-media/rocket-lazyload-common/serc/Assets.php Line 242.
I also though about catching the whole iframe element, which is inside noscript tags and replacing it with the image on click, but i didnt want to mess with the code too much.
I would really appreciate it if you included a fix of your choice for this particular issue in a future update, so it would be safe updating the plugin without losing the functionality described above.
Thank you in advance !
- The topic ‘Lazy Loaded Youtube Video Requires 2 clicks to Play’ is closed to new replies.