diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-02 19:24:45 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-02 19:24:45 +0200 |
commit | 0d8bba263dc195147d6fdb09662e7926f0a58b3e (patch) | |
tree | 4c570b4376c323e585120e7695b8715be7aa8881 /web/stream.gathering.org/index.pl | |
parent | e4354b47bd8891c5b1ee591fdf74b3ca67eee461 (diff) |
Bump lots of changes
Diffstat (limited to 'web/stream.gathering.org/index.pl')
-rwxr-xr-x | web/stream.gathering.org/index.pl | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/web/stream.gathering.org/index.pl b/web/stream.gathering.org/index.pl index fda33c3..e2bc165 100755 --- a/web/stream.gathering.org/index.pl +++ b/web/stream.gathering.org/index.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -I /srv/streamlib +#!/usr/bin/perl -I /root/tgmanage/web/streamlib use warnings; use strict; use CGI; @@ -47,7 +47,13 @@ $template->param(STREAMS => \@streams); $template->param(CAMSTREAMS => \@camstreams); $template->param(NOHEADER => $no_header); if(exists $input{url}) { - $template->param(VIDEO_URL => decode_base64($input{url})); + my $decodedUrl = decode_base64($input{url}); + # Check against XS-scripting: + if (index($decodedUrl, 'cubemap.tg15.gathering.org/') != -1) { + $template->param(VIDEO_URL => $decodedUrl); + } else { + $template->param(VIDEO_URL => $video_url); + } $template->param(VIDEO_AUTO_PLAY => 'true'); } else { $template->param(VIDEO_URL => $video_url); @@ -62,7 +68,7 @@ sub loop_webcams() { if ($streams{$name}->{type} eq $_[0] && $streams{$name}->{online}) { my $vlc_url = "http://stream.tg$tg.gathering.org/generate_vlc.pl?delivery=%s&stream=${name}&interlaced=%s"; my $multicast = $streams{$name}->{has_multicast} ? "multicast" : "unicast"; - $multicast = "unicast" if ($force_unicast == 1 || not $is_local); + $multicast = "unicast" if (defined $force_unicast && $force_unicast == 1 || not $is_local); my $vlc_link = sprintf($vlc_url, $multicast, $streams{$name}->{interlaced}); my $href_link = '<a class="stream-link-content" href="#" onclick="swapVideo(\'' . $streams{$name}->{url} . '\');">'; |