I'm currently utilizing the ride theme on my Shopify website and I've embedded a video in an index.json file:
"video_url": "https:\/\/www.youtube.com\/watch?v=KlxiEKrhWIQ",
Is there a way to make the video automatically start playing when a visitor lands on the page?
Additionally, I have identified a section that includes the following iframe:
<template>
{%- if section.settings.video_url.type == 'youtube' -%}
<iframe src="https://www.youtube.com/embed/{{ section.settings.video_url.id }}?enablejsapi=1" class="js-youtube" allow="autoplay; encrypted-media" allowfullscreen title="{{ section.settings.description | escape }}"></iframe>
{%- else -%}
<iframe src="https://player.vimeo.com/video/{{ section.settings.video_url.id }}" class="js-vimeo" allow="autoplay; encrypted-media" allowfullscreen title="{{ section.settings.description | escape }}"></iframe>
{%- endif -%}
</template>
Any suggestions or solutions on how to achieve this autoplay feature? I attempted adding ?autoplay=1 after the ID, but it didn't yield the desired outcome.
Appreciate any assistance. Thank you.