Я думаю, что ошибка на самом деле вводит в заблуждение. У меня была та же проблема, но я считаю, что на самом деле это хром, который больше не автоматически воспроизводит героя. Я получаю эту ошибку: Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
Исправлением для меня было отключение звука на видео в Javascript До воспроизведения видео. Версия iframe для встраивания с теми же свойствами будет не autoplay
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
// 3. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('ythero', {
videoId: '3FjTef9gn3Q',
height: '100%',
width: '100%',
playerVars: {
rel: 0,
controls: 0,
showinfo: 0,
autoplay: 1,
loop: 1,
playlist: '3FjTef9gn3Q',
modestbranding: 1
},
events: {
'onReady': onPlayerReady,
}
});
}
// 4. The API will call this function when the video player is ready.
function onPlayerReady(event) {
event.target.mute();
event.target.playVideo();
}
</script>