--- a/web/marathon-serpentine-2018/reloader.php Fri Sep 21 13:58:48 2018 +0200
+++ b/web/marathon-serpentine-2018/reloader.php Fri Sep 21 13:59:11 2018 +0200
@@ -2,17 +2,17 @@
include_once('./config.php');
header("Content-type: application/x-javascript");
?>
-var startYoutubeCode = "<?php echo($youtube_code ? $youtube_code : '') ?>";
+var startEmbedCode = "<?php echo($islive_embed ? $islive_embed : '') ?>";
-function getCurrentYoutubeCode() {
+function getCurrentEmbedCode() {
var resCode = null;
- var youtubeCodeList = [
- <?php foreach ($youtube_code_list as $time_entry): ?>
+ var embedCodeList = [
+ <?php foreach ($embed_code_list as $time_entry): ?>
[<?php echo($time_entry[0]->getTimestamp() * 1000); ?>, <?php echo($time_entry[1]->getTimestamp() * 1000); ?>, "<?php echo($time_entry[2]);?>"],
<?php endforeach; ?>
];
var currentTime = Date.now();
- youtubeCodeList.some(function(timeEntry) {
+ embedCodeList.some(function(timeEntry) {
if(currentTime >= timeEntry[0] && currentTime <= timeEntry[1]) {
resCode = timeEntry[2];
return true;
@@ -22,7 +22,7 @@
}
setInterval(function() {
- if(getCurrentYoutubeCode() !== startYoutubeCode) {
+ if(getCurrentEmbedCode() !== startEmbedCode) {
window.location.reload(true);
}
-}, 5000);
+}, 60000);