It is possible to autoplay a regular YouTube video in fancybox by appending ?autoplay=1 to the video URL:
video
… and …
$(document).ready(function(){
$("a.lightbox").fancybox();
});
Unfortunately in some browsers (Chrome, Safari) this doesn't work if the "privacy-enhanced mode" is enabled (youtube-nocookie.com):
privacy-enhanced mode video
The option autoplay=1 is not fully supported on youtube-nocookie.com.
How can I still have the video automatically played in the lightbox with privacy-enhanced mode?
Edit (Mar 23): Firefox, Chrome and Safari start playing the video immediately on
https://www.youtube.com/embed/zRwBVYjUBOc?autoplay=1 (also without fancybox – just open the url). I found out that Firefox still starts to play the video on
https://www.youtube-nocookie.com/embed/zRwBVYjUBOc?autoplay=1 , only Safari and Chrome don't.
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)