How can I make my hero video clickable on the Frame theme?

Hi There,

I’m trying to figure out how to make my hero video clickable rather than using a button over top of the video. Can someone assist with what I would need to do. Im using the Frame theme if it’s relevant.

Many Thanks,

Zoe

Hi @Likwidmonkey
This is Theodore from PageFly - Shopify Page Builder App.
For solving the problem about the Clickable Hero Video, let’s try this solution:
You can refer to this example code


  

// Get a reference to the div tag.
const myDiv = document.querySelector('#my-div');

// Add an event listener to the div tag.
myDiv.addEventListener('click', function() {
  // Call the video code.
  const myVideo = document.querySelector('#my-video');
  myVideo.play();
});

I’ll be so happy if my suggestion can help to solve your problem. If you have any further questions, please feel free to tell me.
Best regards,
Theodore | PageFly

Apologies - Im very new at this. I know how to edit code, but Im not sure where to put the suggestions you have put above.

Many thanks

Hi @Likwidmonkey
This is Theodore from PageFly - Shopify Page Builder App.
For solving the problem about the Clickable Hero Video, let’s try this solution:
Online Store ->Theme ->Edit code → theme.liquid. Add code in here

I’ll be so happy if my suggestion can help to solve your problem. If you have any further questions, please feel free to tell me.
Best regards,
Theodore | PageFly

Hi @Likwidmonkey

Could you share your store URL?