Skip to content

Commit

Permalink
Merge again
Browse files Browse the repository at this point in the history
  • Loading branch information
grant committed Apr 26, 2014
2 parents 692c385 + 790fcdd commit a4f8fbe
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -20,6 +20,7 @@ Tech
- Stylus
- Jade
- SVG
- Redbull

API
====
Expand Down
4 changes: 2 additions & 2 deletions private/styl/play.styl
Expand Up @@ -103,9 +103,9 @@ body
padding overlayPadding
width 120px
ul.friends
bottom 10px
bottom -20px
width 100%
height 100px
height 80px
text-align center
.friend
&:hover
Expand Down
2 changes: 1 addition & 1 deletion public/css/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions public/js/play.js
Expand Up @@ -25,10 +25,11 @@ $(function () {
audioElem.addEventListener("timeupdate", function() {
var curTime = audioElem.currentTime;
if (curTime >= starttimeoffset + duration) {
$(".photo").addClass("stopped");
// $(".photo").addClass("stopped");
$(".progressjs-progress").hide();
$('#animated-1').attr('dur', '50s');
$('#animated-2').attr('dur', '30s');
$('.left.arrow').click();
// audioElem.pause();
playNext();
}
Expand Down Expand Up @@ -63,7 +64,7 @@ $(function () {
progressJs(".progress").set(0);
$('#widget').attr('src', sound.stream_url + '?client_id=' + client_id);
$('#song-title').html(sound.title);
$('#song-author').html('By <a target="_blank" href="' + sound.user.permalink_url + '">' + sound.user.username + '</a>');
// $('#song-author').html('By <a target="_blank" href="' + sound.user.permalink_url + '">' + sound.user.username + '</a>');
if (sound.artwork_url) {
var img = $('<img/>').attr('src', sound.artwork_url.replace("large", "crop"));
img.addClass("current");
Expand Down Expand Up @@ -123,6 +124,11 @@ $(function () {
});
}

function loadFriendSong(clicked) {
var url = clicked.data('url');
playOne(url);
}

ui.addBinds({
onLeft : playNext,
onRight : saveTrack,
Expand All @@ -131,7 +137,8 @@ $(function () {
var url = clicked.data('url');
playOne(url);
},
onDropped : sendRecommendation
onDropped : sendRecommendation,
onAlbumClick : loadFriendSong
});

// on page load, get and play something
Expand Down
6 changes: 3 additions & 3 deletions public/js/ui.js
Expand Up @@ -51,7 +51,6 @@ function UIViewModel() {

var albumClick = function(clicked) {
for (var i = 0; i < bindings.onAlbumClick.length; i++) {
//console.log(typeof bindings.onRight[i]);
bindings.onAlbumClick[i](clicked);
}
};
Expand Down Expand Up @@ -164,8 +163,9 @@ function UIViewModel() {
toTrash();
});

$('.albumPhoto').click(function() {
albumClick($(this));
$('body').on('click', '.albumPhoto', function() {
if (dragging == null)
albumClick($(this));
});

$('.right.arrow').click(function () {
Expand Down

0 comments on commit a4f8fbe

Please sign in to comment.