diff options
author | dedeibel | 2017-12-10 18:02:48 +0100 |
---|---|---|
committer | dedeibel | 2017-12-10 18:27:05 +0100 |
commit | eed207f8dfd68117715518c83fc32d3ae9e1e094 (patch) | |
tree | a130f34fc994223d6daebb4863024ca34f1dc977 /view | |
parent | be515f5150f20c773371f680efad58f2d0fcaaf0 (diff) |
Allowed multi translation for embedding, fixed autoplay option
Diffstat (limited to 'view')
-rw-r--r-- | view/embed.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/view/embed.php b/view/embed.php index eb7caee..aaf203d 100644 --- a/view/embed.php +++ b/view/embed.php @@ -1,11 +1,24 @@ <?php $room = $conference->getRoom($_GET['room']); + if(!$room->hasEmbed()) throw new NotFoundException('Embedding is not enabled in this room'); -$stream = $room->selectStream( - $_GET['selection'], $_GET['language']); +$selection = $_GET['selection']; +$language = $_GET['language']; + +if ($language !== 'native' && $language !== 'stereo') { + if (! $room->hasTranslation()) { + throw new NotFoundException('Not translated'); + } + + if (! $room->isValidLanguage($language)) { + throw new NotFoundException('Language not found'); + } +} + +$stream = $room->selectStream($selection, $language); echo $tpl->render(array( 'page' => 'embed', |