How Do I Autoplay an Embed YouTube Video in Shopify Homepage

Follow Below steps to embed a youtube video in your shopify store with autoplay, and loop.

  1. Go to customize
  2. Click on Add section
  3. Select Custom Liquid or Custom HTML
  4. Paste below code in the input box in the right sidebar.
  5. Replace the ID of your video which is just after embed/ and after playlist=
.youtube-container {
	overflow: hidden;
	width: 50%;
    margin: 0 auto;
	aspect-ratio: 16/9;
	pointer-events: none;
.youtube-container 	iframe {
    width: 300%;
    height: 100%;
    margin-left: -100%;
@media screen and (max-width: 800px) {
    .youtube-container {
	    width: 90%;
<div class='youtube-container'>
    <iframe src=''></iframe>