Michael_Walkling Posted July 25, 2022 Posted July 25, 2022 Hello. I'd like to suggest a new feature for Squarespace 7.1. "Live Photo" style image/video galleries Much like with iOS live Photo - I'd like to create a still image gallery, and when the visitor hovers their cursor on an image (or, for mobile devices, holds their finger on the image), the image changes to a video and plays automatically. This is an example of what I would like to achieve, and I think you'll agree it's pretty effective. It's a Wordpress website. (Note: Not all images in this example website work as videos): https://palladianmedia.com/built-environment/ If this has been posted the wrong place then please let me know where new feature suggestions can be posted?
paul2009 Posted July 25, 2022 Posted July 25, 2022 48 minutes ago, Michael_Walkling said: If this has been posted the wrong place then please let me know where new feature suggestions can be posted? Squarespace employees don't routinely monitor this forum for feature requests (see the guidelines - item 6). If you’d like to make a feature request, you can do so by contacting Squarespace Customer Care using a support ticket. Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Michael_Walkling Posted July 25, 2022 Author Posted July 25, 2022 Thank you, Paul. In the mean time, if anyone has a suggestion as to how a "Live Photo" effect can currently be achieved then I'd be delighted to hear about it. Thank you in advance.
paul2009 Posted July 25, 2022 Posted July 25, 2022 2 hours ago, Michael_Walkling said: In the mean time, if anyone has a suggestion as to how a "Live Photo" effect can currently be achieved then I'd be delighted to hear about it. The WP page you mentioned contains some short mp4 videos, Some JavaScript is then used to play them on mouseover and stop them on mouseout. Although this isn't a built-in feature on Squarespace, a developer could achieve this with some mp4 videos and some code 🙂 As a simple example, if I add that same video to a Code Block on a site and add some simple JS, I can achieve the same thing. For example, see https://recordit.co/9ANEZX11oc Michael_Walkling 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Michael_Walkling Posted July 25, 2022 Author Posted July 25, 2022 Thank you for taking the time to reply, Paul. I can see that this would work well. Would you be ok to share the JS used to play and stop the video? Was this pasted in to the code block? Thanks.
Solution paul2009 Posted July 25, 2022 Solution Posted July 25, 2022 2 hours ago, Michael_Walkling said: Would you be ok to share the JS used to play and stop the video? It was a very simplistic example, added to Settings > Advanced> Code Injection > Footer: <script> myVideo = document.querySelector('video'); function hoverVideo(e) { myVideo.play(); } function hideVideo(e) { myVideo.pause(); } myVideo.addEventListener('mouseover', hoverVideo, false); myVideo.addEventListener('mouseout', hideVideo, false); </script> Michael_Walkling 1 Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links. Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.
Michael_Walkling Posted July 26, 2022 Author Posted July 26, 2022 Thank you Paul. This is really helpful. I've added an additional line of code to reset the video on mouseout: <script> myVideo = document.querySelector('video'); function hoverVideo(e) { myVideo.play(); } function hideVideo(e) { myVideo.pause(); myVideo.currentTime = 0; } myVideo.addEventListener('mouseover', hoverVideo, false); myVideo.addEventListener('mouseout', hideVideo, false); </script> Thanks again. This is exactly what I require. paul2009 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment