How can I auto-play my custom liquid content without the play button?

How can I auto-play my custom liquid content without the play button?

Barbieminaj
New Member
9 0 0

Hi, I added custom liquids on my website but they don’t automatically play. It shows a press play button on all my custom liquid content. How can I remove that? Thanks!

Reply 1 (1)

Jay120
Excursionist
17 1 1

Can you please tell me what is the src of the video- YouTube, Vimeo or Shopify??

 

if the video is coming from YouTube use this code "<iframe width="560" height="315" src="https://www.youtube.com/embed/YOUR_VIDEO_ID?autoplay=1" frameborder="0" allowfullscreen></iframe>

Replace YOUR_VIDEO_ID with the actual ID of your YouTube video.

 

If the video is coming from shopify use this 

  1. Edit Your Shopify Theme:

    • Go to your Shopify admin.
    • In the left-hand navigation, click on "Online Store" and then "Themes."
  2. Access the Code Editor:

    • Find your current theme and click on "Actions" > "Edit Code."
  3. Locate the Video Embed Code:

    • Look for the section in your code where the video is embedded. This might be in a liquid file or an HTML file depending on your theme.
  4. Add Autoplay Attribute:

    • Locate the <video> tag that corresponds to your video and add the autoplay attribute to it. For example:
      htmlCopy code
      <video autoplay controls> <source src="{{ your_video_source }}" type="video/mp4"> Your browser does not support the video tag. </video>
  5. Save Changes:

    • After adding the autoplay attribute, save your changes.
  6. Test:

    • Test your website to see if the video now autoplay.

 

I would suggest upload the video on YouTube and thn use it. That would be very easy and fast.