Jump to content

Remove controls and link auto play videos

Recommended Posts

Hi there, 

I'm currently using some Gifs on various parts of my site, but I'm aware they are big files and don't look great, and that using MP4 files is a better solution. I placed an autoplaying video on my site (now removed) using the following code in a code block:

<video autoplay="autoplay" muted loop="true" width="100%" controls>
  <source src="ADDFILEURLHERE" type="video/mp4">
</video>

It worked in playing the video on a loop, however there are a couple of issues with it. The first is that the video controls are still visible when it loads and on hover, is there a way of removing these so the video appears like a gif? Secondly is there a way of linking code blocks through to other pages as this is how the images on my homepage work.

Any help would be very much appreciated.

Many thanks, 

Tim.

 

https://www.timjobling.co.uk/

Link to comment
  • Replies 1
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted (edited)

Hi, 

Thanks so much for your reply.

I've tried out the above code, it works for playing the video on the auto-loop without the controls, however the click-through link doesn't work, I think this must be because of the style="pointer-events:none;" section, if this is removed then the link works but it also shows the video controls and pauses the video when you click on it. 

I'm not sure if there is a work-around for this?

I've also noticed that the auto-play feature doesn't work on mobile so if there is a way to get that to work too that would be amazing.

Thanks again for your help!

 

Edited by timjphoto
additional question
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.