diff options
Diffstat (limited to 'template/assemblies')
-rw-r--r-- | template/assemblies/player/audio.phtml | 17 | ||||
-rw-r--r-- | template/assemblies/player/video.phtml | 30 | ||||
-rw-r--r-- | template/assemblies/switcher/dash.phtml | 10 | ||||
-rw-r--r-- | template/assemblies/switcher/video.phtml | 79 |
4 files changed, 14 insertions, 122 deletions
diff --git a/template/assemblies/player/audio.phtml b/template/assemblies/player/audio.phtml index c3594eb..71b01b4 100644 --- a/template/assemblies/player/audio.phtml +++ b/template/assemblies/player/audio.phtml @@ -1,3 +1,5 @@ +<!-- Uses regular player only if translation is forced --> +<? if($stream->isTranslated()): ?> <video preload="auto" controls="controls" @@ -9,8 +11,15 @@ src="<?=h($stream->getAudioUrl('mp3'))?>" type="audio/mp3" /> - <source - src="<?=h($stream->getAudioUrl('opus'))?>" - type="audio/opus" - /> </video> + +<!-- Use voc-player per default, TODO: implement preferred language feature --> +<? else: ?> +<div class="video-wrap" + data-voc-player + data-stream="<?=h($room->getStream())?>" + data-poster="<?=h($stream->getPoster())?>" + data-audio-only="true" +></div> +<? endif ?> + diff --git a/template/assemblies/player/video.phtml b/template/assemblies/player/video.phtml deleted file mode 100644 index 3eae170..0000000 --- a/template/assemblies/player/video.phtml +++ /dev/null @@ -1,30 +0,0 @@ -<div - style="max-width: <?=h($stream->getVideoWidth())?>px; max-height: <?=h($stream->getVideoHeight())?>px;" - class="video-wrap <? if($room->hasSubtitles()): ?>has-subtitles<? endif ?>" - data-subtitles-room-id="<?=h($room->getSubtitlesRoomId())?>" -> - <video - <? if(!isset($autoplay) || $autoplay == true): ?> - autoplay="autoplay" - <? endif ?> - preload="auto" - width="<?=h($stream->getVideoWidth())?>" - height="<?=h($stream->getVideoHeight())?>" - poster="<?=h($stream->getPoster())?>" - style="width: 100%; height: 100%;" - class="mejs" - > - <source - data-plugin-type="native" - src="<?=h($stream->getVideoUrl('webm'))?>" - title="WebM (Icecast)" - type="video/webm" - /> - <source - data-plugin-type="native" - src="<?=h($stream->getVideoUrl('hls'))?>" - title="h.264 (HLS)" - type="application/vnd.apple.mpegURL" - /> - </video> -</div> diff --git a/template/assemblies/switcher/dash.phtml b/template/assemblies/switcher/dash.phtml index 5aa56b4..41077b4 100644 --- a/template/assemblies/switcher/dash.phtml +++ b/template/assemblies/switcher/dash.phtml @@ -1,13 +1,5 @@ <div class="container-fluid"> - <div class="notes well"> - <h3 class="beta">WebM DASH</h3> - <p><a href="https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP">DASH</a> is an adaptive-bitrate HTTP-based streaming solution that is (unlike existing proprietary solutions such as HLS) internationally standardized.</p> - <p>Support for DASH in open source software such as ffmpeg is still pretty rough, so consider this a technology-preview, it's not yet a stable solution.</p> - <p>Please report your experience to <a href="https://twitter.com/c3voc">@c3voc</a>.</p> - </div> - - <div class="directlinks"> <? foreach(Stream::getVideoProtos() as $proto => $display): ?> <h3>Direct links (<?=h($display)?>)</h3> @@ -52,7 +44,7 @@ <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-group" role="group" title="<?=h($switcherstream->getVideoTech("dash"))?>"> <div class="btn btn-primary" disabled>DASH</div> <a href="<?=h($room->getDashManifestUrl())?>" target="_blank" class="btn btn-default"> <span class="fa fa-flask"></span> diff --git a/template/assemblies/switcher/video.phtml b/template/assemblies/switcher/video.phtml deleted file mode 100644 index ae2815f..0000000 --- a/template/assemblies/switcher/video.phtml +++ /dev/null @@ -1,79 +0,0 @@ -<div class="container-fluid"> - <h3>Video</h3> - <div class="formats row"> - - <? foreach($room->getVideoResolutions() as $res): ?> - <? $selection = $room->createSelectionObject($res) ?> - <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($selection->getLink())?>" class="btn btn-primary"> - <span class="fa fa-flag-o"></span> - 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 - </a> - - <? endif ?> - </div> - </div> - <? endforeach ?> - - </div> - - <div class="notes well"> - <? include("$assemblies/desktop-player.phtml") ?> - </div> - - <div class="directlinks"> - <? foreach(Stream::getVideoProtos() as $proto => $display): ?> - <h3>Direct links (<?=h($display)?>)</h3> - <div class="row"> - <? foreach($room->getVideoResolutions() as $res): ?> - <? $selection = $room->createSelectionObject($res) ?> - <? $switcherstream = $room->createStreamObject($res) ?> - <div class="col-lg-3 col-md-4 col-lg-5 col-xs-12"> - <div class="btn-group" role="group" title="<?=h($switcherstream->getVideoTech($proto))?>"> - <div class="btn btn-primary" disabled><?=h($selection->getDisplay())?></div> - <? if($room->hasTranslation()): ?> - - <a href="<?=h($room->createStreamObject($res, 'native')->getVideoUrl($proto))?>" class="btn btn-default"> - <span class="fa fa-flag-o"></span> - 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 - </a> - - <? endif ?> - </div> - </div> - <? endforeach ?> - </div> - <? endforeach ?> - </div> -</div> |