What's your biggest current challenge? Have your say in Community Polls along the right column.

How can I remove video controls and add clickable links on Origin theme?

Solved

How can I remove video controls and add clickable links on Origin theme?

Shredventure
Tourist
6 0 1

I was struggling to get video to autoplay on the Origin theme homepage and found this code that I used to make a custom CSS section:

<video controls="" loop="" muted="" playsinline="" autoplay="" src="url" width="100%" height="100%"></video>

 

This is the preview of what it's looking like: https://60d67rdas8gg36td-55947755706.shopifypreview.com

It's working but I have two questions:
- is there a way to get rid of the video controls?

- can I make the video block clickable with a link?

thanks in advance

Accepted Solution (1)

AliReviews
Shopify Partner
773 90 358

This is an accepted solution.

Hello @Shredventure ,

 

You can remove the controls attribute from the <video> tag like this 

<video loop muted playsinline autoplay src="url" width="100%" height="100%"></video>

 

To make the video block clickable with a link, wrap the <video> tag in an <a> tag and add a "href" attribute with the desired link URL like this:

<a href="https://example.com">
  <video loop muted playsinline autoplay src="url" width="100%" height="100%"></video>
</a>

 

Hope this can help.

Ali Reviews team.

- Was my answer helpful? Please hit Like or Mark it as solution!
- Ali Reviews - The must-have Shopify app that empowers you to effortlessly collect, display, and manage product reviews.
- Start your FREE trial today!

View solution in original post

Replies 3 (3)

saim007
Shopify Partner
609 74 103

Hi @Shredventure 

1. Yes, you have to just change the value of controls="false" autoplay="true" loop="true" muted the controls won't see.

2. Yes, you have to put video tag in the anchor tag like this <a href="your-link"><video> </video></a> 

 

Please let me know if works and please like mark as solve!

Saim | Shopify Partner Expert

Was I helpful?

Buy me a Coffee

🙂
Hire me   to unlock the full potential of your e-commerce store 🙂

AliReviews
Shopify Partner
773 90 358

This is an accepted solution.

Hello @Shredventure ,

 

You can remove the controls attribute from the <video> tag like this 

<video loop muted playsinline autoplay src="url" width="100%" height="100%"></video>

 

To make the video block clickable with a link, wrap the <video> tag in an <a> tag and add a "href" attribute with the desired link URL like this:

<a href="https://example.com">
  <video loop muted playsinline autoplay src="url" width="100%" height="100%"></video>
</a>

 

Hope this can help.

Ali Reviews team.

- Was my answer helpful? Please hit Like or Mark it as solution!
- Ali Reviews - The must-have Shopify app that empowers you to effortlessly collect, display, and manage product reviews.
- Start your FREE trial today!
Shredventure
Tourist
6 0 1

this worked perfectly, thanks!