From d1fdb6237750d0553b26b0726428d28507141aa6 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Mon, 28 Dec 2015 11:21:51 +0100 Subject: force protocol on urls coming from relive --- lib/helper.php | 8 ++++++++ template/assemblies/player/relive.phtml | 2 +- template/relive-player.phtml | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/helper.php b/lib/helper.php index 6635fb1..c23d211 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -37,6 +37,14 @@ function forceslash($url) return $url; } +function forceproto($url) +{ + if(startswith('//', $url)) + $url = proto().':'.$url; + + return $url; +} + function startswith($needle, $haystack) { return substr($haystack, 0, strlen($needle)) == $needle; diff --git a/template/assemblies/player/relive.phtml b/template/assemblies/player/relive.phtml index 718b249..e9fe89c 100644 --- a/template/assemblies/player/relive.phtml +++ b/template/assemblies/player/relive.phtml @@ -8,7 +8,7 @@ class="relive" > diff --git a/template/relive-player.phtml b/template/relive-player.phtml index 2ee9ace..0fdee88 100644 --- a/template/relive-player.phtml +++ b/template/relive-player.phtml @@ -21,7 +21,7 @@

Download

-

Click here to Download this Relive recording. Beware! This is an unprocessed streamdump – a final release will follow soon.

+

Click here to Download this Relive recording. Beware! This is an unprocessed streamdump – a final release will follow soon.

@@ -42,7 +42,7 @@

Sorry about the Flash

As there is no desktop player which supports time-shifting, we chose embed a Flash player here which does. - If you still want to watch with a desktop player, use this URL: + If you still want to watch with a desktop player, use this URL:

Note: Downloading this file is useless because of the way HLS works. You need to play the URL from your player. -- cgit v1.2.3