実装
iframeで以下を埋め込む
<iframe
class="movie"
type="text/html"
width="720"
height="405"
src="https://www.youtube.com/embed/VIDEOID?autoplay=1&loop=1&playlist=VIDEOID"
frameborder="0"
allowfullscreen
></iframe>
autoplay=1
で自動再生
loop=1
でループ
playlist
をしないと自動再生が効かない
サンプル
以下のように自動再生、無限ループができます。
https://mystifying-lewin-f6c484.netlify.com/youtube