aboutsummaryrefslogtreecommitdiff
path: root/lib/helper.php
diff options
context:
space:
mode:
authorMaZderMind2015-03-01 16:17:20 +0100
committerMaZderMind2015-03-01 16:17:20 +0100
commitb07e1beaa8e3ff0653ea5b02cd26737c227dc667 (patch)
treed659fd6acba7951f3c31564fb33b929c9a50048e /lib/helper.php
parent20dd29c322a24a2ef9e3f0e5c269a97acd5d2518 (diff)
music & audio tabs
Diffstat (limited to '')
-rw-r--r--lib/helper.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 699c44e..efdf84c 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -33,11 +33,11 @@ function link_stream($protocol, $room, $format, $translated = false)
case 'webm':
return 'http://cdn.c3voc.de/'.rawurlencode(streamname($room)).'_'.rawurlencode($language).'_'.rawurlencode($format).'.webm';
+ case 'music':
+ return 'http://cdn.c3voc.de/'.rawurlencode(streamname($room)).'.'.rawurlencode($format);
+
case 'audio':
- if(in_array($room, array('lounge', 'ambient')))
- return 'http://cdn.c3voc.de/'.rawurlencode(streamname($room)).'.'.rawurlencode($format);
- else
- return 'http://cdn.c3voc.de/'.rawurlencode(streamname($room)).'_'.rawurlencode($language).'.'.rawurlencode($format);
+ return 'http://cdn.c3voc.de/'.rawurlencode(streamname($room)).'_'.rawurlencode($language).'.'.rawurlencode($format);
case 'slide':
return 'http://cdn.c3voc.de/slides/'.rawurlencode(streamname($room)).'/current.png';
@@ -157,7 +157,13 @@ function room_has_video($room)
function room_has_audio($room)
{
$formats = get("ROOMS.$room.FORMATS");
- return count(array_intersect(array('audio-mp3', 'audio-opus'), $formats)) > 0;
+ return count(array_intersect(array('audio-mp3', 'audio-opus', 'audio-ogg'), $formats)) > 0;
+}
+
+function room_has_music($room)
+{
+ $formats = get("ROOMS.$room.FORMATS");
+ return count(array_intersect(array('music-mp3', 'music-opus', 'music-ogg'), $formats)) > 0;
}
function room_has_slides($room)