From be515f5150f20c773371f680efad58f2d0fcaaf0 Mon Sep 17 00:00:00 2001 From: Benjamin Peter Date: Sat, 9 Dec 2017 23:44:47 +0100 Subject: Added multple translation tracks with configurable endpoints and labels --- model/Stream.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'model/Stream.php') diff --git a/model/Stream.php b/model/Stream.php index daed17f..a4dcf72 100644 --- a/model/Stream.php +++ b/model/Stream.php @@ -2,11 +2,12 @@ class Stream { - public function __construct(Room $room, $selection, $language) + public function __construct(Room $room, $selection, $language, $translation_label = null) { $this->room = $room; $this->selection = $selection; $this->language = $language; + $this->translation_label = (empty($translation_label)) ? $language : $translation_label; } public function getRoom() @@ -24,9 +25,14 @@ class Stream return $this->language; } + public function getTranslationLabel() + { + return $this->translation_label; + } + public function isTranslated() { - return $this->getLanguage() == 'translated'; + return !empty($this->getLanguage()) && $this->getLanguage() !== 'native'; } public function getVideoSize() @@ -98,7 +104,7 @@ class Stream } if($this->isTranslated()) - $display .= ' (Translation)'; + $display .= ' ('. $this->getTranslationLabel() .')'; return $display; } -- cgit v1.2.3 From eed207f8dfd68117715518c83fc32d3ae9e1e094 Mon Sep 17 00:00:00 2001 From: dedeibel Date: Sun, 10 Dec 2017 18:02:48 +0100 Subject: Allowed multi translation for embedding, fixed autoplay option --- model/Stream.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'model/Stream.php') diff --git a/model/Stream.php b/model/Stream.php index a4dcf72..28cb0f8 100644 --- a/model/Stream.php +++ b/model/Stream.php @@ -32,7 +32,9 @@ class Stream public function isTranslated() { - return !empty($this->getLanguage()) && $this->getLanguage() !== 'native'; + return !empty($this->getLanguage()) && + $this->getLanguage() !== 'native' && + $this->getLanguage() !== 'stereo'; } public function getVideoSize() -- cgit v1.2.3 From 0b73843d5e0d0ac22a46db28090e707566668ae4 Mon Sep 17 00:00:00 2001 From: dedeibel Date: Mon, 11 Dec 2017 20:03:35 +0100 Subject: Leading Spaces to Tabs --- model/Stream.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'model/Stream.php') diff --git a/model/Stream.php b/model/Stream.php index 28cb0f8..99abaf1 100644 --- a/model/Stream.php +++ b/model/Stream.php @@ -32,9 +32,9 @@ class Stream public function isTranslated() { - return !empty($this->getLanguage()) && - $this->getLanguage() !== 'native' && - $this->getLanguage() !== 'stereo'; + return !empty($this->getLanguage()) && + $this->getLanguage() !== 'native' && + $this->getLanguage() !== 'stereo'; } public function getVideoSize() -- cgit v1.2.3