Answer the question
In order to leave comments, you need to log in
How to automatically start playing youtube videos on a website in chrome?
Not so long ago , the video autoplay policy changed in chrome , in connection with this, the question is: how is it normal to automatically launch videos from YouTube? Now it starts, only after reloading the page.
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
videoId: 'VIDEO_ID',
playerVars: {'controls': 0, 'showinfo': 0, 'rel': 0, 'autoplay': 1, 'loop': 1},
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question