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 | |
parent | e4354b47bd8891c5b1ee591fdf74b3ca67eee461 (diff) |
Bump lots of changes
Diffstat (limited to 'web/stream.gathering.org')
-rwxr-xr-x | web/stream.gathering.org/embed.pl | 2 | ||||
-rwxr-xr-x | web/stream.gathering.org/generate_vlc.pl | 8 | ||||
-rwxr-xr-x | web/stream.gathering.org/index.pl | 12 |
3 files changed, 15 insertions, 7 deletions
diff --git a/web/stream.gathering.org/embed.pl b/web/stream.gathering.org/embed.pl index 38fbf9c..bdd00eb 100755 --- a/web/stream.gathering.org/embed.pl +++ b/web/stream.gathering.org/embed.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; diff --git a/web/stream.gathering.org/generate_vlc.pl b/web/stream.gathering.org/generate_vlc.pl index 4d14ebe..2b7ff04 100755 --- a/web/stream.gathering.org/generate_vlc.pl +++ b/web/stream.gathering.org/generate_vlc.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl -I /srv/streamlib
+#!/usr/bin/perl -I /root/tgmanage/web/streamlib
use warnings;
use strict;
@@ -51,9 +51,11 @@ if (exists($streams{$stream})) { } else {
#$port_del = 80;
$extinf .= "Unicasted";
- $url = $base_url;
+ $url = $base_url;
$url_path = $streams{$stream}->{url};
- $url_path =~ s/.flv/.ts/;
+ if($streams{$stream}->{ts_enabled} eq 1) {
+ $url_path =~ s/.flv/.ts/;
+ }
}
$port_del = $streams{$stream}->{preport} if (defined($streams{$stream}->{preport}));
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} . '\');">'; |