diff options
author | Benjamin Peter | 2017-12-12 14:07:49 +0100 |
---|---|---|
committer | GitHub | 2017-12-12 14:07:49 +0100 |
commit | 3229c9e8af148575d87b4dfbd878ffb300a2ddd2 (patch) | |
tree | 52a824f118f99f14d7079d2c05e9f3035350e1ee /view/embed.php | |
parent | 65397e5734b1439df4d68be40ffe994f26e551ec (diff) | |
parent | 0b73843d5e0d0ac22a46db28090e707566668ae4 (diff) |
Merge pull request #56 from voc/feature/multitranslations
Feature/multitranslations
Diffstat (limited to '')
-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..97df148 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', |