It is possible to autoplay a regular YouTube video in fancybox by appending ?autoplay=1
to the video URL:
<a class="lightbox" href="https://www.youtube.com/embed/zRwBVYjUBOc?autoplay=1">video</a>
… and …
$(document).ready(function(){
$("a.lightbox").fancybox();
});
Unfortunately this doesn't work if the "privacy-enhanced mode" is enabled (youtube-nocookie.com):
<a class="lightbox" href="https://www.youtube-nocookie.com/embed/zRwBVYjUBOc?autoplay=1">privacy-enhanced mode video</a>
The option autoplay=1
is not supported on youtube-nocookie.com.
How can I still have the video automatically played in the lightbox with privacy-enhanced mode?
from Autoplay YouTube video (privacy-enhanced mode) in fancybox 3
0 komentar:
Posting Komentar