I'm trying to make it so when someone visits my homepage they will see a short video, then be redirected to another webpage. My goal is to have it redirect the user to the second page after the video ends, no matter how long the length of the video is. Eg. 4 seconds, or 5 min, etc. I know my code here is different from what I want to get to, but I'm sure I am close to the answer.
This is what I have so far:
<html>
<head>
<link href="style.css" rel="stylesheet" type="text/css">
<meta http-equiv="refresh" content="1.10;URL='https://example.com/page2'" />
</head>
<body>
<video autoplay="" id="video">
<source src="hi.mp4" type="video/mp4"/>
</video>
</body>
</html>
I've seen it done before on other sites where after the video finishes it would then redirect the user to another page. I've gotten as far as setting a time before it refreshes to another page, but is there some other way where I can make it when the video ends? Any examples would be appreciated.