Music without the MP3 player showing?

  • 1
  • Question
  • Updated 6 years ago
  • Answered
Sorry if this is old ground. I want to play background music without the widget MP3 player showing. I have tried to copy the source code generated by the widget and then replace it with HTML if that makes sense and then mucking about but it plays very erratically. I am new to all this HTML but I am having fun trying.

Many thanks Yola-Folk.
Photo of Michael R Tait.

Michael R Tait.

  • 3 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Stefan

Stefan, Official Rep

  • 4448 Posts
  • 190 Reply Likes
Hello Michael

You can do this by adding a "hidden" attribute to the "embed" tag. This is what the original code of your MP3 Player Widget looks like (this example contains the URL to one of my music files):
<div id="I183" style="display:block;clear: both;" class="JWPlayerMP3_Default">    

<div class="sys_jw_player_mp3">
<style type="text/css">
div.sys_jw_player_mp3{padding:5px;}
div.sys_jw_player_mp3 p{margin:0;padding:5px 0;text-align:center;}
</style>
<embed width="100%" height="24" flashvars="file=resources/10 Aus Verschiedenem Holz.mp3&duration=&autostart=true" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#ffffff" name="ply" id="ply" style="" src="classes/components/JWPlayerMP3/resources/player.swf" type="application/x-shockwave-flash" />
<p id="sys_jw_player_mp3_file_name_I183">10 Aus Verschiedenem Holz.mp3</p>
<p></p>
</div>

</div>

First add your music with the MP3 Player Widget to your website and publish. Then view the source code of your page, and copy the code section that looks like the one I added above.

Paste the code into an HTML Widget in your Yola Sitebuilder and remove the MP3 Player Widget.

Now go back to the HTML Widget and modify the following:
1. Add hidden="true" to the embed tag:
<embed hidden="true" flashvars="file=resources/10 Aus Verschiedenem Holz.mp3&duration=&autostart=true" wmode="opaque" allowscriptaccess="always" allowfullscreen="true" quality="high" bgcolor="#ffffff" name="ply" id="ply" style="" src="classes/components/JWPlayerMP3/resources/player.swf" type="application/x-shockwave-flash" />

2. Remove the width and height attributes from the embed tag.
3. Remove the p tags (below the embed tag) which include the name of your music file.

This will hide the MP3 Player Widget from your page. Hope this helps! Please let me know if you have any questions.