Skip to content

Commit b99294e

Browse files
authored
Not restricted to mp3 (#4)
1 parent 2eb8587 commit b99294e

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ openMixtape is an electronic [Mixtape](http://en.wikipedia.org/wiki/Mixtape), in
1717
## Settings
1818

1919
* `settings.json`: title, baseline and background color of the playlist
20-
* `playlist.json`: contain each song (artist, song title and the link to the mp3 file) of the playlist
20+
* `playlist.json`: contain each song (artist, song title and the link to the audio file) of the playlist
2121

2222
## Dependencies
2323

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ <h2>Let the music play!</h2>
2626
{{#songs}}
2727
<li class="song">
2828
<div class="name">
29-
<a href="{{mp3}}" data-src="{{mp3}}"><span class="artist">{{artist}}</span> - <span class="title">{{title}}</span></a>
29+
<a href="{{file}}" data-src="{{file}}"><span class="artist">{{artist}}</span> - <span class="title">{{title}}</span></a>
3030
</div>
3131
<div class="info">
3232
<strong class="duration"></strong><span class="loaded"></span>

js/openmixtape.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ $(function() {
6060
if (!next.length) next = $('ol li').first();
6161
next.addClass('playing').siblings().removeClass('playing');
6262
this.load($('a', next).attr('data-src'));
63-
this.play();
63+
audio5.on('canplay', function () {
64+
audio5.play();
65+
}, this);
6466
}, this);
6567
/* Loading progress */
6668
this.on('progress', function(load_percent) {

playlist.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"songs": [
3-
{"artist": "Duke", "title": "Nukem", "mp3": "songs/duke.mp3"},
4-
{"artist": "Dhalius", "title": "Yeah", "mp3": "https://archive.org/download/DhaliusMusicCollection2002-2010/YEAH.mp3"},
5-
{"artist": "Tom Caruana", "title": "Welcome Aboard", "mp3": "https://archive.org/download/Welcome_Aboard-5483/Tom_Caruana_-_07_-_Get_It_Off_Your_Chest.mp3"},
6-
{"artist": "Jason Shaw", "title": "Mornings", "mp3": "https://archive.org/download/Audionautix_Acoustic-9870/Jason_Shaw_-_12_MORNINGS.mp3"},
7-
{"artist": "Evgeny Grinko", "title": "Winter Sunshine", "mp3": "https://archive.org/download/Winter_Sunshine_EP-8201/Evgeny_Grinko_-_01_-_Winter_Sunshine.mp3"},
8-
{"artist": "Dave Howes", "title": "Roméo Alpha", "mp3": "https://archive.org/download/RomeoAlpha/RomeoAlpha.mp3"}
3+
{"artist": "Duke", "title": "Nukem", "file": "songs/duke.mp3"},
4+
{"artist": "Dhalius", "title": "Yeah", "file": "https://archive.org/download/DhaliusMusicCollection2002-2010/YEAH.mp3"},
5+
{"artist": "Tom Caruana", "title": "Welcome Aboard", "file": "https://archive.org/download/Welcome_Aboard-5483/Tom_Caruana_-_07_-_Get_It_Off_Your_Chest.mp3"},
6+
{"artist": "Jason Shaw", "title": "Mornings", "file": "https://archive.org/download/Audionautix_Acoustic-9870/Jason_Shaw_-_12_MORNINGS.mp3"},
7+
{"artist": "Evgeny Grinko", "title": "Winter Sunshine", "file": "https://archive.org/download/Winter_Sunshine_EP-8201/Evgeny_Grinko_-_01_-_Winter_Sunshine.mp3"},
8+
{"artist": "Dave Howes", "title": "Roméo Alpha", "file": "https://archive.org/download/RomeoAlpha/RomeoAlpha.mp3"},
9+
{"artist": "AAC", "title": "Demo", "file": "songs/gs-16b-2c-44100hz.aac"}
910
]
1011
}

songs/gs-16b-2c-44100hz.aac

236 KB
Binary file not shown.

0 commit comments

Comments
 (0)