aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies/player
diff options
context:
space:
mode:
Diffstat (limited to 'template/assemblies/player')
-rw-r--r--template/assemblies/player/audio.phtml17
-rw-r--r--template/assemblies/player/video.phtml30
2 files changed, 13 insertions, 34 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>