Difference between revisions of "Widget:AudioPlayer"

From LNF Wiki
Jump to navigation Jump to search
(Created page with "<audio controls="controls"> <source src="<!--{$url|validate:url}-->" type="audio/mpeg" /> <embed src="<!--{$url|validate:url}-->" autoplay="false" hidden="false" loop="f...")
 
Line 1: Line 1:
 +
<noinclude>
 +
This widget is designed to embed an audio player. Use the following code:
 +
<pre>{{#widget:AudioPlayer|url=path-to-audio-file}}</pre>
 +
where <code>path-to-audio-file</code> is the path to the audio file to play.
 +
<span style="color: red">Note: This widget currently only supports mpeg formats (e.g. *.mp3)</span>
 +
</noinclude>
 +
<includeonly>
 
<audio controls="controls">
 
<audio controls="controls">
<source src="<!--{$url|validate:url}-->" type="audio/mpeg" />
+
<source src="<!--{$url|validate:url}-->" type="audio/mpeg" />
<embed src="<!--{$url|validate:url}-->" autoplay="false" hidden="false" loop="false">
+
<embed src="<!--{$url|validate:url}-->" autoplay="false" hidden="false" loop="false">
</audio>
+
</audio>
 +
</includeonly>

Revision as of 15:19, 27 October 2014

This widget is designed to embed an audio player. Use the following code:

{{#widget:AudioPlayer|url=path-to-audio-file}}

where path-to-audio-file is the path to the audio file to play. Note: This widget currently only supports mpeg formats (e.g. *.mp3)