I'm trying to set up two pages to swap between each other based on the time of the day. So between 8 am to 10 pm it goes to BBC one page, if not it goes to the BBC news page. I came up with the below, but the page keeps getting stuck on refreshing again and again at some point it stops and go, but I would like to make it more straight forward eliminating this circulation. I don't know what is wrong, to be honest, it seemed to be working fine but every time it triggers the refresh the page takes a lot of time dealing with something loading again and again.
<!DOCTYPE html>
<html>
<script>
var hours = new Date().getHours();
if(hours >= 8 && hours >= 10){
window.location.href = "file://S:/Astraia/Data/Staff TV/BBCone.html";
}else{
window.location.href = "file://S:/Astraia/Data/Staff TV/BBCnews.html";
}
</script>
<head>
<meta charset=utf-8 />
<title>:: Soft Services | Now ::</title>
<style type="text/css">
body {
background-color: #000000;
overflow-y: hidden; /* Hide vertical scrollbar */
overflow-x: hidden; /* Hide horizontal scrollbar */
}
</style>
<meta http-equiv="refresh" content="3500">
<link href="https://unpkg.com/video.js/dist/video-js.css" rel="stylesheet">
<script src="https://unpkg.com/video.js/dist/video.js"></script>
<script src="https://unpkg.com/videojs-contrib-hls/dist/videojs-contrib-hls.js"></script>
</head>
<body>
<video id="my_video_1" class="video-js vjs-fluid vjs-default-skin" controls preload="auto" autoplay="autoplay" data-setup='{}'>
<source src="https://bbc.iplayer.com" type="application/x-mpegURL">
</video>
<script>
var player = videojs('my_video_1');
player.play();
</script>
</body>
</html>
This