We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 7fdb6fae authored by Jonas Haraldsson's avatar Jonas Haraldsson

move call to nowPlaying()

Only call it if track has been played for more than 0 seconds
parent 4bff5287
......@@ -101,9 +101,6 @@ function playerReady() {
*/
function play() {
audio.play();
if(!now_playing) {
nowPlaying();
}
$("#play").hide();
$("#pause").show();
$("#seekforward").fadeTo("normal", 1);
......@@ -149,6 +146,11 @@ function updateProgress() {
} else {
$("#duration").text(friendlyTime(0));
}
if(!now_playing && audio.currentTime > 0) {
nowPlaying();
}
if (!scrobbled && audio.currentTime > audio.duration / 2) {
scrobble();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment