web/client.php
changeset 1439 df4c992749ea
parent 1436 b3d23c1b791e
child 1443 66ca0c90c47c
--- a/web/client.php	Thu Sep 20 13:23:31 2018 +0200
+++ b/web/client.php	Thu Sep 20 15:10:28 2018 +0200
@@ -46,7 +46,9 @@
 }
 
 $embed = (isset($_REQUEST['embed']) && $_REQUEST['embed']);
-$embed_video = isset($_REQUEST['embed_video']) ? boolval($_REQUEST['embed_video']) : true;
+$embed_video = isset($_REQUEST['embed_video']) ? 
+    boolval($_REQUEST['embed_video']) :
+    (isset($config['islive_embed']) && $config['islive_embed']) || (isset($config['islive']) && $config['islive']);
 $videoWidth = ( $embed ? 412 : 480 );
 $videoHeight = ( $embed ? 280 : 320 );
 if ($embed && !isset($_SESSION['TWITTER_ACCESS_TOKEN']) && (isset($_REQUEST['auth_redirect']) || isset($_SERVER['HTTP_REFERER']))) {
@@ -94,6 +96,11 @@
     <script type="text/javascript" src="<?php echo(registry_url('underscore','js'))?>"></script>
     <script type="text/javascript" src="<?php echo(registry_url('raphael','js'))?>"></script>
     <script type="text/javascript" src="<?php echo(registry_url('fancybox','js'))?>"></script>
+    <?php if( isset($config['additional_js']) && !empty($config['additional_js'])) { 
+        foreach ($config['additional_js'] as $jsUrl) {?>
+    <script type="text/javascript" src="<?php echo($jsUrl)?>"></script>
+        <?php }
+    } ?>
 
     <style>
     video {
@@ -344,7 +351,7 @@
 <?php
     if (isset($config['islive']) && $config['islive']) {
         $videofile = $translate->_('config__video_file');
-        if ($videofile == 'config__video_file') $videofile = "https://media.iri.centrepompidou.fr/dash/livestream.mpd";
+        if ($videofile === 'config__video_file') $videofile = "https://media.iri.centrepompidou.fr/dash/livestream.mpd";
 ?>
 
                     <script type="text/javascript" src="<?php echo(registry_url('dashjs','js'))?>"></script>