Implementation

EP Player is created in Flash, so implementing the player in HTML works like any other Flash file.
The download comes with some simple HTML examples that are worth checking out for a quick start.

The best way to implement the player is using one of the following methods:

SWFObject method
Implementation with Flash player detection and ActiveX activation, requires Javascript

Object method
Very simple method good for blogs and sites where you have limited control over the HTML of the page, requires no Javascript.


SWFObject method

First we need to include the SWFObject script in our page header:

<script src='js/swfobject.js' type='text/javascript'></script>


In the body of the page we include the MP3 Player code.
Important: To use multiple players on one page you need to give every instance an unique 'container-id' and 'player-id'.

<div id='ep_container1'>
	To view the <a href='http://www.epplayer.com' target='_blank'>Flash MP3 Player</a> please update your <a href='http://get.adobe.com/flashplayer/' target='_blank'>Flash Player</a>.
</div>
	
<script type='text/javascript'>
		
	////////////////////////////////////////////////////////////////////////////
	var flashvars = {};
	flashvars.skin = 'skins/nobius_mk2/skin.xml';
	flashvars.playlist = 'playlist.xml';
	flashvars.autoplay = 'false';
	flashvars.shuffle = 'false';
	flashvars.key = 'REGISTRATIONKEY';
		
	////////////////////////////////////////////////////////////////////////////
	var params = {};
		
	////////////////////////////////////////////////////////////////////////////
	var attributes = {};
	attributes.id = 'ep_player1';
		
	////////////////////////////////////////////////////////////////////////////
	swfobject.embedSWF(
		'ep_player.swf', // location of the swf file
		'ep_container1', // id of the container div to print the player in
		'400', '350', // width / height of the player
		'10.0.0', // required flash version
		false,
		flashvars,
		params,
		attributes
	);
	
</script>



Object method

For blogs and sites where you have limited control over the HTML of the page you can use the object code.
Important: To use multiple players on one page you need to give every instance an unique 'player-id'.

<object id="ep_player1" type="application/x-shockwave-flash" data="ep_player.swf" width="400" height="300">
	<param name="movie" value="ep_player.swf" />
	<param name="flashvars" value="playlist=playlist.xml&skin=skins/basic_silver/skin.xml&key=REGISTRATIONKEY"> 
	<span>To view the <a href="http://www.epplayer.com/" target="_blank">Flash MP3 Player</a> please update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a>.</span>
</object>


You can add your parameters (autoplay, key, shuffle) to the flashvars param.
If your page is hosted on another server than your EP Player files you must use absolute paths for all files you load.