aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaZderMind2018-03-24 16:38:34 +0100
committerMaZderMind2018-03-24 16:38:34 +0100
commitaab0638c331326067c45e802b1ef84195093d3e7 (patch)
tree65c42d010bfa5b2f896261b11ffc5dbb57c23b51
parentd9b0ad07f741be3d31720b2c4954f3f88d210abf (diff)
parentab6b41fcf3503ff0701e98ac986b4da5a86def7f (diff)
Merge branch 'default-to-dash'
-rw-r--r--index.php6
-rw-r--r--model/Room.php33
-rw-r--r--model/RoomTab.php8
3 files changed, 27 insertions, 20 deletions
diff --git a/index.php b/index.php
index a526b06..0de1823 100644
--- a/index.php
+++ b/index.php
@@ -295,7 +295,7 @@ try {
require('view/room.php');
}
- else if(preg_match('@^([^/]+)/(sd|audio|slides|dash)$@', $route, $m))
+ else if(preg_match('@^([^/]+)/(hd|sd|audio|slides|video)$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
@@ -305,7 +305,7 @@ try {
require('view/room.php');
}
- else if(preg_match('@^([^/]+)/(sd|audio|slides|dash)/i18n/([^/]+)$@', $route, $m))
+ else if(preg_match('@^([^/]+)/(hd|sd|audio|slides|video)/i18n/([^/]+)$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
@@ -315,7 +315,7 @@ try {
require('view/room.php');
}
- else if(preg_match('@^embed/([^/]+)/(hd|sd|audio|slides)/(native|stereo|[^/]+)(/no-autoplay)?$@', $route, $m))
+ else if(preg_match('@^embed/([^/]+)/(hd|sd|audio|slides|dash)/(native|stereo|[^/]+)(/no-autoplay)?$@', $route, $m))
{
$_GET = array(
'room' => $m[1],
diff --git a/model/Room.php b/model/Room.php
index 9ec6ebe..7089532 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -212,6 +212,15 @@ class Room
public function getSelectionNames()
{
$selections = array();
+ if($this->hasDash())
+ $selections[] = 'dash';
+
+ if($this->hasAudio())
+ $selections[] = 'audio';
+
+ if($this->hasMusic())
+ $selections[] = 'music';
+
if($this->hasHdVideo())
$selections[] = 'hd';
@@ -221,15 +230,6 @@ class Room
if($this->hasSlides())
$selections[] = 'slides';
- if($this->hasAudio())
- $selections[] = 'audio';
-
- if($this->hasMusic())
- $selections[] = 'music';
-
- if($this->hasDash())
- $selections[] = 'dash';
-
return $selections;
}
@@ -241,11 +241,8 @@ class Room
public function getTabNames()
{
$tabs = array();
- if($this->hasVideo())
- $tabs[] = 'video';
-
- if($this->hasSlides())
- $tabs[] = 'slides';
+ if($this->hasDash())
+ $tabs[] = 'dash';
if($this->hasAudio())
$tabs[] = 'audio';
@@ -253,8 +250,11 @@ class Room
if($this->hasMusic())
$tabs[] = 'music';
- if($this->hasDash())
- $tabs[] = 'dash';
+ if($this->hasVideo())
+ $tabs[] = 'video';
+
+ if($this->hasSlides())
+ $tabs[] = 'slides';
return $tabs;
}
@@ -331,6 +331,7 @@ class Room
public function selectStream($selection, $language = 'native')
{
+ if($selection == 'video') $selection = 'hd';
$selections = $this->getSelectionNames();
if(count($selections) == 0)
diff --git a/model/RoomTab.php b/model/RoomTab.php
index cd9e355..4848f57 100644
--- a/model/RoomTab.php
+++ b/model/RoomTab.php
@@ -37,8 +37,14 @@ class RoomTab
case 'music':
return 'Radio';
+ case 'video':
+ return 'Video (Legacy)';
+
+ case 'slides':
+ return 'Slides (Legacy)';
+
case 'dash':
- return 'Adaptive Quality Video';
+ return 'Video';
default:
return ucfirst($tab);