Jump to content

Play video then redirect to another page

Recommended Posts

Hi everyone,

I'm working on a website and need some help with implementing a specific feature. Here's what I'm aiming to achieve:

  1. When a user arrives on the landing page, a short video (around 5 seconds) should automatically start playing.
  2. Once the video ends, the user should be automatically redirected to another page (the video could also be an overlay that closes when it ends).
  3. The video should only start playing when the user is actively on the page. If the user opens the website in another tab but hasn't switched to it yet, the video should not start.

Could someone guide me on how to implement this functionality effectively? Any suggestions or code snippets would be greatly appreciated. Thanks in advance!

Edited by alxrca
Link to comment
  • Replies 1
  • Views 116
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.