diff options
author | Benjamin Peter | 2017-12-09 23:44:47 +0100 |
---|---|---|
committer | dedeibel | 2017-12-10 18:25:21 +0100 |
commit | be515f5150f20c773371f680efad58f2d0fcaaf0 (patch) | |
tree | 2035fa3a60399686b6c5f6e381124be68c5c667e /template/assemblies/switcher | |
parent | 65397e5734b1439df4d68be40ffe994f26e551ec (diff) |
Added multple translation tracks with configurable endpoints and labels
Diffstat (limited to 'template/assemblies/switcher')
-rw-r--r-- | template/assemblies/switcher/audio.phtml | 20 | ||||
-rw-r--r-- | template/assemblies/switcher/slides.phtml | 12 | ||||
-rw-r--r-- | template/assemblies/switcher/video.phtml | 28 |
3 files changed, 35 insertions, 25 deletions
diff --git a/template/assemblies/switcher/audio.phtml b/template/assemblies/switcher/audio.phtml index 182572e..eab77fb 100644 --- a/template/assemblies/switcher/audio.phtml +++ b/template/assemblies/switcher/audio.phtml @@ -10,12 +10,14 @@ <a href="<?=h($selection->getLink())?>" class="btn btn-primary"> <span class="fa fa-flag-o"></span> - native + Native </a> - <a href="<?=h($selection->getTranslatedLink())?>" class="btn btn-primary"> + <? foreach($room->getTranslations() as $translation): ?> + <a href="<?=h($selection->getTranslatedLink($translation['endpoint']))?>" class="btn btn-primary"> <span class="fa fa-flag"></span> - translated + <?=h(ucfirst($translation['label']))?> </a> + <? endforeach ?> </div> </div> @@ -39,12 +41,14 @@ <a href="<?=h($room->createStreamObject('audio', 'native')->getAudioUrl($proto))?>" class="btn btn-default"> <span class="fa fa-flag-o"></span> - native - </a> - <a href="<?=h($room->createStreamObject('audio', 'translated')->getAudioUrl($proto))?>" class="btn btn-default"> - <span class="fa fa-flag"></span> - translated + Native </a> + <? foreach($room->getTranslations() as $translation): ?> + <a href="<?=h($room->createStreamObject('audio', $translation['endpoint'])->getAudioUrl($proto))?>" class="btn btn-default"> + <span class="fa fa-flag"></span> + <?=h(ucfirst($translation['label']))?> + </a> + <? endforeach ?> <? else: ?> diff --git a/template/assemblies/switcher/slides.phtml b/template/assemblies/switcher/slides.phtml index dfbc26d..ba70c5f 100644 --- a/template/assemblies/switcher/slides.phtml +++ b/template/assemblies/switcher/slides.phtml @@ -10,12 +10,14 @@ <a href="<?=h($selection->getLink())?>" class="btn btn-primary"> <span class="fa fa-flag-o"></span> - native - </a> - <a href="<?=h($selection->getTranslatedLink())?>" class="btn btn-primary"> - <span class="fa fa-flag"></span> - translated + Native </a> + <? foreach($room->getTranslations() as $translation): ?> + <a href="<?=h($selection->getTranslatedLink($translation['endpoint']))?>" class="btn btn-primary"> + <span class="fa fa-flag"></span> + <?=h(ucfirst($translation['label']))?> + </a> + <? endforeach ?> </div> </div> diff --git a/template/assemblies/switcher/video.phtml b/template/assemblies/switcher/video.phtml index 3877128..ae2815f 100644 --- a/template/assemblies/switcher/video.phtml +++ b/template/assemblies/switcher/video.phtml @@ -12,18 +12,20 @@ <a href="<?=h($selection->getLink())?>" class="btn btn-primary"> <span class="fa fa-flag-o"></span> - native - </a> - <a href="<?=h($selection->getTranslatedLink())?>" class="btn btn-primary"> - <span class="fa fa-flag"></span> - translated + Native </a> + <? foreach($room->getTranslations() as $translation): ?> + <a href="<?=h($selection->getTranslatedLink($translation['endpoint']))?>" class="btn btn-primary"> + <span class="fa fa-flag"></span> + <?=h(ucfirst($translation['label']))?> + </a> + <? endforeach ?> <? else: ?> <a href="<?=h($selection->getLink())?>" class="btn btn-primary"> <span class="fa fa-video-camera"></span> - video + Video </a> <? endif ?> @@ -51,18 +53,20 @@ <a href="<?=h($room->createStreamObject($res, 'native')->getVideoUrl($proto))?>" class="btn btn-default"> <span class="fa fa-flag-o"></span> - native - </a> - <a href="<?=h($room->createStreamObject($res, 'translated')->getVideoUrl($proto))?>" class="btn btn-default"> - <span class="fa fa-flag"></span> - translated + Native </a> + <? foreach($room->getTranslations() as $translation): ?> + <a href="<?=h($room->createStreamObject($res, $translation['endpoint'])->getVideoUrl($proto))?>" class="btn btn-default"> + <span class="fa fa-flag"></span> + <?=h(ucfirst($translation['label']))?> + </a> + <? endforeach ?> <? else: ?> <a href="<?=h($switcherstream->getVideoUrl($proto))?>" class="btn btn-default"> <span class="fa fa-video-camera"></span> - video + Video </a> <? endif ?> |