How to resolve reload live event videopage problem

I have done “index.php” videopage where I inform my customers from the coming Live events.

First of all and before live event has started people see webpage “notStarted.html” where I tell the audience that live event will start at a specific time.

Then I have live event page “started.html” what will open live Streaming videoplayer.

Third I have “ended.html” what will open after live event has ended.


My question is that I would like to refresh “notStarted.html” page every 10 seconds before live event has started and stop refreshing while “started.html” live show is on the air. I need to stop refreshing while videoplayer is running otherwise videostreaming stops/cuts every new refresh.

After and when live event has ended there is no need to reload page, I will show new temporary page and info people from next coming live event.

Question why I want to refresh “notStared.html” is because when audience is waiting my live event to start, it will open automatically to the live player and they do not need to refresh this page again.

I have tried many different kind of options, also experienced programmer can see right away that my example has simple refresh code, but it should stop when live event starts.

I am not programmer and not so deep in code, so I would be very happy from any tips how to go foward andsolve this.

Thanks in advance

Sammy


Playeritest
 

[php]<?php

$startingTime = mktime(13, 14, 0, 2, 4, 2012); //Time and date when Live webcast starts

$currentTime = time () ;// Current time

$endingTime = mktime(13, 15, 0, 2, 4, 2012) ;// Live Streaming ends

if ($currentTime < $startingTime) {
require “notStarted.html”;// Shows webpage with info that program will start…

}
elseif ($currentTime >= $startingTime AND $currentTime <= $endingTime) {
require “started.html”;// Opens streaming video player for live video

}

else {
require “ended.html”;// Shows webpage with info that program has ended and next sending will be…
}

?>[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service