x-mixtaper
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.
Demo
Install
Install the component using Bower:
$ bower install x-mixtaper --save
Usage
-
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!
Development
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
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D