aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies/switcher/audio.phtml
diff options
context:
space:
mode:
authorMaZderMind2015-03-30 16:20:30 +0200
committerMaZderMind2015-03-30 16:20:30 +0200
commitf7d9d592745d1cb5cb2de76ed6ae99be974f1807 (patch)
tree0f9f77efe9efc70b3ac0404a46b249f809197922 /template/assemblies/switcher/audio.phtml
parentea4b6c7699a7fbb7be3d9e5ce86c84a36b63f569 (diff)
Implement MVT Pattern based on simple Config options
Diffstat (limited to 'template/assemblies/switcher/audio.phtml')
-rw-r--r--template/assemblies/switcher/audio.phtml33
1 files changed, 17 insertions, 16 deletions
diff --git a/template/assemblies/switcher/audio.phtml b/template/assemblies/switcher/audio.phtml
index 53131d3..9f3ba76 100644
--- a/template/assemblies/switcher/audio.phtml
+++ b/template/assemblies/switcher/audio.phtml
@@ -1,5 +1,6 @@
<div class="container-fluid">
- <? if($has_translation): ?>
+ <? $selection = $room->createSelectionObject('audio') ?>
+ <? if($room->hasTranslation()): ?>
<h3>Audio</h3>
<div class="formats row">
@@ -7,11 +8,11 @@
<div class="btn-group" role="group">
<div class="btn btn-primary" disabled>Audio</div>
- <a href="<?=h(link_player($room, 'audio'))?>" class="btn btn-default">
+ <a href="<?=h($selection->getLink())?>" class="btn btn-default">
<span class="fa fa-flag-o"></span>
native
</a>
- <a href="<?=h(link_player($room, 'audio', true))?>" class="btn btn-default">
+ <a href="<?=h($selection->getTranslatedLink())?>" class="btn btn-default">
<span class="fa fa-flag"></span>
translated
</a>
@@ -23,35 +24,35 @@
<? endif ?>
- <h3>Directlinks</h3>
- <div class="formats row">
- <? foreach(array_intersect($formats, array('audio-mp3', 'audio-opus', 'audio-ogg')) as $format): ?>
- <div class="col-lg-3 col-md-4 col-lg-5 col-xs-12">
- <? $proto = substr($format, 6) ?>
- <div class="btn-group" role="group" title="<?=h(get("FORMAT.$format"))?>">
- <div class="btn btn-primary" disabled><?=h(strtoupper($proto))?></div>
+ <div class="directlinks">
- <? if($has_translation): ?>
+ <? foreach(Stream::getAudioProtos() as $proto => $display): ?>
+ <h3>Directlinks (<?=h($display)?>)</h3>
+ <div class="row">
+ <div class="col-lg-3 col-md-4 col-lg-5 col-xs-12">
+ <div class="btn-group" role="group">
+ <div class="btn btn-primary" disabled><?=h($selection->getDisplay())?></div>
+ <? if($room->hasTranslation()): ?>
- <a href="<?=h(link_stream('audio', $room, $proto))?>" class="btn btn-default">
+ <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(link_stream('audio', $room, $proto, true))?>" class="btn btn-default">
+ <a href="<?=h($room->createStreamObject('audio', 'translated')->getAudioUrl($proto))?>" class="btn btn-default">
<span class="fa fa-flag"></span>
translated
</a>
<? else: ?>
- <a href="<?=h(link_stream('audio', $room, $proto))?>" class="btn btn-default">
+ <a href="<?=h($room->createStreamObject('audio')->getAudioUrl($proto))?>" class="btn btn-default">
<span class="fa fa-volume-up"></span>
- audio
+ video
</a>
<? endif ?>
-
+ </div>
</div>
</div>
<? endforeach ?>