x-mixtaper is a Web Components (Polymer) audio player with playlist functionality built for sharing/publishing mixtapes and playlists.
x-mixtaper is a Web Components (Polymer based) audio player with playlist functionality built for sharing/publishing mixtapes and playlists.
It reads what to play from the mixtapes.json
, which supports several playlists.
Install the component using Bower:
$ bower install x-mixtaper --save
Import Web Components' polyfill:
<script src="bower_components/platform/platform.js"></script>
Import Custom Element:
<link rel="import" href="bower_components/x-mixtaper/dist/x-mixtaper.html">
Add your own mixtapes.json and mp3s (or copy the samples provided)
{
"tape1": {
"title": "My first mixtape",
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"songs": [{
"title": "Ukulele Song",
"artist": "Rui Ramos",
"file":"/mp3/1/RuiRamos-UkuleleSong.mp3",
"length": "04:22"
},{
"title": "I Dreamed a Dream",
"artist": "Wing",
"file":"/mp3/1/02 I Dreamed a Dream.m4a",
"length": "03:21"
}]
}
}
Start using it!
<x-mixtaper tape="tape1"></x-mixtaper>
Remember that for the audio skipping to work you must be using a web server with HTTP 1.1 byte-range requests support.
Feel free to use it and submit pull requests!
In order to run it locally you'll need to fetch some dependencies and a basic server setup.
$ [sudo] npm install -g bower grunt-cli
Install local dependencies:
$ bower install && npm install
To test your project, start the development server and open http://localhost:8000
.
$ grunt server
To build the distribution files before releasing a new version.
$ grunt build
To provide a live demo, send everything to gh-pages
branch.
$ grunt deploy
git checkout -b my-new-feature
git commit -m 'Add some feature'
git push origin my-new-feature