File: INSTALL

Recommend this page to a friend!
  Classes of Axel Hahn   AMC JavaScript Audio Player HTML5   INSTALL   Download  
File: INSTALL
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: AMC JavaScript Audio Player HTML5
DIsplay an audio player with surround support
Author: By
Last change: v1.01

- init got a container id as param
- fix: draw volume bar if no local storage value exists yet
Date: 2 years ago
Size: 3,332 bytes
 

Contents

Class file image Download
-------------------------------------------------------------------------------- INSTALL Axels Multi Channel Player GNU GPL v 3.0 project home: https://sourceforge.net/p/amcplayer/ docs: https://www.axel-hahn.de/docs/amcplayer/index.htm -------------------------------------------------------------------------------- ABOUT Javascript based audioplayer. It uses html 5 audio tag to play media. Its focus is to play audios with different channels: I have songs in stereo (2.0) and surround (5.1). I wrote this player to switch between stereo- and sourround media. LICENSE GNU GPL v 3.0 STATUS Stable DOWNLOAD download package from https://sourceforge.net/projects/amcplayer/ Extract all files below a webroot in any subdirectory, i.e. [webroot]/javascript EMBED PLAYER IN YOUR WEBSITE For a real life demo have a look to example/example1.html - open it in your browser. If not read a short intro below. Copy all files excluding the example directory to your webserver. For JS and CSS files exist minified versions In your html page: - load the css in the header - load the javascript at the end of the document example: <!doctype html> <html> <head> (...) <link rel="stylesheet" type="text/css" href="/path/mcplayer.min.css" media="screen" /> </head> <body> (...) <script src="/path/addi.min.js"></script> <script src="/path/mcplayer.min.js"></script> <!-- initialize the player --> <script> var oMcPlayer=new mcPlayer(); oMcPlayer.init(); </script> </body> </html> AUDIOS The player detects all audio tags in a html document and builds a playlist. What you should know: Different webbrowsers can handle different file formats. All modern webbrowsers can play stereo audios (mp3 or ogg). Surround audios are not possible to play in Firefox and Opera; it plays in Internet Explorer 9 and Chrome (1). I suggest to add stereo and surround audio sources into a single audio tag. Use the title (2) tag to define the number of channels. I suggest to use encoded sounds - for stereo playback: OGG and MP3 - for surround: OGG and M4A (Mpeg 4 Audio; = AAC) 1) related sources (German only) http://www.axel-hahn.de/blog/2012/05/14/html5-audio-und-surround-sound/ http://www.axel-hahn.de/demos/html5-audio/tester-audio-formats.php 2) The data-NN attribute unfortunatly cannot be handled in the Internet Explorer 9. That's why I decided to use the title tag Use attribut preload="none" in your audio tag - otherwise a browser tries to prefetch all files of your songs in your page. example: <audio loop="loop" controls="controls" preload="none" title="My nice Song" > <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" /> <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" /> </audio> --------------------------------------------------------------------------------