timjphoto Posted May 22 Share Posted May 22 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
timjphoto Posted May 22 Author Share Posted May 22 (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 May 22 by timjphoto additional question Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment