aboutsummaryrefslogtreecommitdiff
path: root/template/assemblies/player/audio.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'template/assemblies/player/audio.phtml')
-rw-r--r--template/assemblies/player/audio.phtml26
1 files changed, 18 insertions, 8 deletions
diff --git a/template/assemblies/player/audio.phtml b/template/assemblies/player/audio.phtml
index c1c7f8f..e007ab3 100644
--- a/template/assemblies/player/audio.phtml
+++ b/template/assemblies/player/audio.phtml
@@ -3,12 +3,22 @@
preload="auto"
style="width: 230px;"
>
- <source
- src="<?=h(link_stream('audio', $room, 'mp3', @$translated))?>"
- type="audio/mp3"
- />
- <source
- src="<?=h(link_stream('audio', $room, 'opus', @$translated))?>"
- type="audio/opus"
- />
+ <? 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 ?>
</audio>