aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies/player
diff options
context:
space:
mode:
authorMaZderMind2015-03-30 16:20:30 +0200
committerMaZderMind2015-03-30 16:20:30 +0200
commitf7d9d592745d1cb5cb2de76ed6ae99be974f1807 (patch)
tree0f9f77efe9efc70b3ac0404a46b249f809197922 /template/assemblies/player
parentea4b6c7699a7fbb7be3d9e5ce86c84a36b63f569 (diff)
Implement MVT Pattern based on simple Config options
Diffstat (limited to 'template/assemblies/player')
-rw-r--r--template/assemblies/player/audio.phtml26
-rw-r--r--template/assemblies/player/music.phtml26
-rw-r--r--template/assemblies/player/slides.phtml20
-rw-r--r--template/assemblies/player/video.phtml42
4 files changed, 38 insertions, 76 deletions
diff --git a/template/assemblies/player/audio.phtml b/template/assemblies/player/audio.phtml
index e007ab3..f8ed579 100644
--- a/template/assemblies/player/audio.phtml
+++ b/template/assemblies/player/audio.phtml
@@ -3,22 +3,12 @@
preload="auto"
style="width: 230px;"
>
- <? if(in_array("audio-mp3", $formats)): ?>
- <source
- src="<?=h(link_stream('audio', $room, 'mp3', @$translated))?>"
- type="audio/mp3"
- />
- <? endif ?>
- <? if(in_array("audio-opus", $formats)): ?>
- <source
- src="<?=h(link_stream('audio', $room, 'opus', @$translated))?>"
- type="audio/opus"
- />
- <? endif ?>
- <? if(in_array("audio-ogg", $formats)): ?>
- <source
- src="<?=h(link_stream('audio', $room, 'ogg', @$translated))?>"
- type="audio/ogg"
- />
- <? endif ?>
+ <source
+ src="<?=h($stream->getAudioUrl('mp3'))?>"
+ type="audio/mp3"
+ />
+ <source
+ src="<?=h($stream->getAudioUrl('opus'))?>"
+ type="audio/opus"
+ />
</audio>
diff --git a/template/assemblies/player/music.phtml b/template/assemblies/player/music.phtml
index 587d2d2..b1c804a 100644
--- a/template/assemblies/player/music.phtml
+++ b/template/assemblies/player/music.phtml
@@ -3,22 +3,12 @@
preload="auto"
style="width: 230px;"
>
- <? if(in_array("music-mp3", $formats)): ?>
- <source
- src="<?=h(link_stream('music', $room, 'mp3', @$translated))?>"
- type="audio/mp3"
- />
- <? endif ?>
- <? if(in_array("music-opus", $formats)): ?>
- <source
- src="<?=h(link_stream('music', $room, 'opus', @$translated))?>"
- type="audio/opus"
- />
- <? endif ?>
- <? if(in_array("music-ogg", $formats)): ?>
- <source
- src="<?=h(link_stream('music', $room, 'ogg', @$translated))?>"
- type="audio/ogg"
- />
- <? endif ?>
+ <source
+ src="<?=h($stream->getMusicUrl('mp3'))?>"
+ type="audio/mp3"
+ />
+ <source
+ src="<?=h($stream->getMusicUrl('opus'))?>"
+ type="audio/opus"
+ />
</audio>
diff --git a/template/assemblies/player/slides.phtml b/template/assemblies/player/slides.phtml
index c2720d6..7887aa0 100644
--- a/template/assemblies/player/slides.phtml
+++ b/template/assemblies/player/slides.phtml
@@ -1,28 +1,22 @@
-<div style="width: 100%; height: 100%; max-width: <?=h($width)?>px; margin: 0 auto;">
+<div style="max-width: <?=h($stream->getVideoWidth())?>px; max-height: <?=h($stream->getVideoHeight())?>px;" class="video-wrap">
<video
autoplay="autoplay"
preload="auto"
- width="<?=h($width)?>"
- height="<?=h($height)?>"
+ width="<?=h($stream->getVideoWidth())?>"
+ height="<?=h($stream->getVideoHeight())?>"
style="width: 100%; height: 100%;"
>
- <!--source
+ <source
data-plugin-type="native"
- src="<?=h(link_stream('webm', $room, 'webm_slides', $translated))?>"
+ src="<?=h($stream->getSlidesUrl('webm'))?>"
title="WebM (Icecast)"
type="video/webm"
- /-->
- <source
- data-plugin-type="flash"
- src="<?=h(link_stream('rtmp', $room, 'slides', $translated))?>"
- title="h.264 (RTMP)"
- type="video/rtmp"
/>
<source
data-plugin-type="native"
- src="<?=h(link_stream('hls', $room, 'slides', $translated))?>"
+ src="<?=h($stream->getSlidesUrl('hls'))?>"
title="h.264 (HLS)"
type="application/vnd.apple.mpegURL"
/>
</video>
-</div> \ No newline at end of file
+</div>
diff --git a/template/assemblies/player/video.phtml b/template/assemblies/player/video.phtml
index 0861cf8..3ffc333 100644
--- a/template/assemblies/player/video.phtml
+++ b/template/assemblies/player/video.phtml
@@ -1,34 +1,22 @@
-<div style="max-width: <?=h($width)?>px; max-height: <?=h($height)?>px;" class="video-wrap">
+<div style="max-width: <?=h($stream->getVideoWidth())?>px; max-height: <?=h($stream->getVideoHeight())?>px;" class="video-wrap">
<video
autoplay="autoplay"
preload="auto"
- width="<?=h($width)?>"
- height="<?=h($height)?>"
+ width="<?=h($stream->getVideoWidth())?>"
+ height="<?=h($stream->getVideoHeight())?>"
style="width: 100%; height: 100%;"
>
- <? if(in_array("webm-$selection", $formats)): ?>
- <source
- data-plugin-type="native"
- src="<?=h(link_stream('webm', $room, $selection, $translated))?>"
- title="WebM (Icecast)"
- type="video/webm"
- />
- <? endif ?>
- <? if(in_array("hls-$selection", $formats)): ?>
- <source
- data-plugin-type="native"
- src="<?=h(link_stream('hls', $room, $hlsformat, $translated))?>"
- title="h.264 (HLS)"
- type="application/vnd.apple.mpegURL"
- />
- <? endif ?>
- <? if(in_array("rtmp-$selection", $formats)): ?>
- <source
- data-plugin-type="flash"
- src="<?=h(link_stream('rtmp', $room, $selection, $translated))?>"
- title="h.264 (RTMP)"
- type="video/rtmp"
- />
- <? endif ?>
+ <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>