Get the files

You can download a zip file and extract it

OR

if you use a version control client you can checkout the sources of the project. It will make it easier to keep the files up to date.


Git clone

Checkout sources with git client.
The following commands create a directory amcplayer below webroot and put all files there:

cd [webroot-directory]/[install-dir]/
git clone https://github.com/axelhahn/amcplayer.git [optional-name-of-subdir]

Leaving [optional-name-of-subdir] empty will create a subdir named "amcplayer"

Download


Get the latest version:
Download

Extract the files somewhere below webroot on your webserver. You can put to any subdirectory.


Add player to your website

Initial code for the player


The following codesnippet shows the most simple steps to integrate the player into your website.
addi.min.css is a class for drag and drop support.
mcplayer.min.css is the player.

<html>
	<head>
		(...)
		<!-- step 1: add the css file in the header -->
		<link rel="stylesheet" type="text/css" href="/javascript/amcplayer/mcplayer.min.css" media="screen" />
	</head>
	<body>

		(...)
	
		<!-- step 2: load and init player - before body end tag -->
		<script src="/javascript/amcplayer/addi.min.js"></script>
		<script src="/javascript/amcplayer/mcplayer.min.js"></script>
		<script>
			var oMcPlayer=new mcPlayer();
			oMcPlayer.init();
			oMcPlayer.minimize();
		</script>

	</body>
</html>

Add audio files


Let's have look how to add a song.
What you need to know is that the html5 audio tag describes HOW to add an audio to a browser. BUT: different browsers support different audio formats.

Add stereo media as MP3 and OGG.
Optionally add surround media as AAC and OGG.

Additionally there are some conventions which html attributes will be read by the amc player.

Each song can look like that:

<audio loop="loop"
	controls="controls"
	preload="none"
	title="My Song"
	>
	
	<!-- stereo sources -->
	<source src="/download/song_2.0_.ogg" type="audio/ogg" data-ch="2.0" title="2.0" />
	<source src="/download/song_2.0_.mp3" type="audio/mp3" data-ch="2.0" title="2.0" />

	<!-- surround sources -->
	<source src="/download/song_5.1_.m4a" type="audio/mp4" data-ch="5.1" title="5.1" />
	<source src="/download/song_5.1_.ogg" type="audio/ogg" data-ch="5.1" title="5.1" />

	<!-- for fallback add a flashplayer here -->

</audio>



See Customization for more details.







Copyright © 2012-2020 Axel Hahn
project page: Sourceforge (en)
GitHub (en)
Axels Webseite (de)
results will be here