I want to delay the autoplay of a youtube video. My video currently autoplays as soon as the page loads. Here is the iframe code I am using:
iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="" frameborder="0" height="315" src="#videolink#?autoplay=1&controls=0" title="YouTube video player" width="560"></iframe
However, there always seems to be a slight delay of start time due to video loading when the page loads. To control for the start time point of the video, I am trying to figure out a way to delay the start of autoplay by 5 seconds. I read posts on using timeout function in javascript, but not exactly sure of the lines to put in there.
Any help would be appreciated.