diff options
Diffstat (limited to 'template')
-rw-r--r-- | template/assemblies/desktop-player.phtml | 6 | ||||
-rw-r--r-- | template/assemblies/switcher/video.phtml | 98 |
2 files changed, 53 insertions, 51 deletions
diff --git a/template/assemblies/desktop-player.phtml b/template/assemblies/desktop-player.phtml index 5836f90..b317abd 100644 --- a/template/assemblies/desktop-player.phtml +++ b/template/assemblies/desktop-player.phtml @@ -1,2 +1,4 @@ -<h3>Use a Desktop-Player!</h3> -<p>Browsers and Video doesn't go together well, even in 2014 and especially when it's live. So for your best viewing-experience please use a Desktop-Player like VLC or mplayer.</p> +<div class="desktop-player-hint"> + <h3>Use a Desktop-Player!</h3> + <p>Browsers and Video doesn't go together well, even in 2014 and especially when it's live. So for your best viewing-experience please use a Desktop-Player like VLC or mplayer.</p> +</div> diff --git a/template/assemblies/switcher/video.phtml b/template/assemblies/switcher/video.phtml index e4fcc5b..a4ac907 100644 --- a/template/assemblies/switcher/video.phtml +++ b/template/assemblies/switcher/video.phtml @@ -1,64 +1,64 @@ <h3>Formats</h3> -<ul> - <? foreach(array('hd', 'sd') as $iter): ?> +<ul class="formats"> + <? foreach($videores as $iter): ?> <li> <span class="label filetype" title="<?=h(format_text($iter))?>"><?=h(strtoupper($iter))?></span> - <a href="<?=h(link_player($room, $iter))?>"> - <span class="fa fa-flag-o"></span> - native - </a> - <a href="<?=h(link_player($room, $iter, true))?>"> - <span class="fa fa-flag"></span> - translated - </a> - </li> - <? endforeach ?> -</ul> -<hr /> - -<? include("$assemblies/desktop-player.phtml") ?> + <? if($has_translation): ?> -<hr /> - -<? foreach(array('rtmp', 'hls') as $protocol): ?> - <h3>Directlinks (<?=h(strtoupper($protocol))?>)</h3> - <ul> - <? - if($protocol == 'hls') - $formats = array('hd', 'sd', 'auto'); - else - $formats = array('hd', 'sd'); - ?> - <? foreach($formats as $iter): ?> - <li> - <span class="label filetype" title="<?=h(format_text($iter))?>"><?=h(strtoupper($iter))?></span> - <a href="<?=h(link_stream($protocol, $room, $iter))?>"> + <a href="<?=h(link_player($room, $iter))?>"> <span class="fa fa-flag-o"></span> native </a> - <a href="<?=h(link_stream($protocol, $room, $iter, true))?>"> + <a href="<?=h(link_player($room, $iter, true))?>"> <span class="fa fa-flag"></span> translated </a> - </li> - <? endforeach ?> - </ul> -<? endforeach ?> -<h3>Directlinks (WebM)</h3> -<ul> - <? foreach(array('hd', 'sd') as $iter): ?> - <li> - <span class="label filetype" title="<?=h(format_text('webm'))?>"><?=h(strtoupper($iter))?></span> - <a href="<?=h(link_stream('webm', $room, $iter))?>"> - <span class="fa fa-flag-o"></span> - native - </a> - <a href="<?=h(link_stream('webm', $room, $iter, true))?>"> - <span class="fa fa-flag"></span> - translated - </a> + <? else: ?> + + <a href="<?=h(link_player($room, $iter))?>"> + <span class="fa fa-video-camera"></span> + video + </a> + + <? endif ?> </li> <? endforeach ?> </ul> + +<? include("$assemblies/desktop-player.phtml") ?> + +<div class="directlinks"> + <? foreach($protos as $proto): ?> + <h3>Directlinks (<?=h(strtoupper($proto))?>)</h3> + <ul> + <? foreach($formats as $format): ?> + <? if(!startswith($proto, $format)) continue ?> + <? $res = substr($format, -2) ?> + <li> + <span class="label filetype" title="<?=h(format_text($res))?>"><?=h(strtoupper($res))?></span> + <? if($has_translation): ?> + + <a href="<?=h(link_stream($proto, $room, $res))?>"> + <span class="fa fa-flag-o"></span> + native + </a> + <a href="<?=h(link_stream($proto, $room, $res, true))?>"> + <span class="fa fa-flag"></span> + translated + </a> + + <? else: ?> + + <a href="<?=h(link_stream($proto, $room, $res))?>"> + <span class="fa fa-video-camera"></span> + video + </a> + + <? endif ?> + </li> + <? endforeach ?> + </ul> + <? endforeach ?> +</div> |