Simple-Audio-Player
Simple-Audio-Player is a lightweight JavaScript library which is implemented as a jQuery plugin and based on flash and soundmanager2.
DEMO
Dependencies
- soundmanager2
- jQuery
- Font Awesome
Installation
bower install Simple-Audio-Player
Usage
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../dist/player.css">
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="../dist/soundmanager2.js"></script>
<script src="../dist/player.js"></script>
<script>
soundManager.setup({ url: '/dist/' }); // path to soundmanager2 files
$(document).ready(function() {
$('#player').player('Losing-My-Religion.mp3'); // relative path to mp3
});
</script>
Running DEMO
- Clone the repository
- Place the content to the root
- Go to /demo/index.html
Notices
- It is necessary to have a web server, you can't open it statically
- You can do
bundle install
andruby server.rb
to run sinatra server
Author (Speransky Danil): Personal Page | LinkedIn | GitHub | StackOverflow