From 0ba19ff00345fe355b4700596bf8ccdec1488b97 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 7 Nov 2014 18:55:34 -0800 Subject: [PATCH] Disable next/previous buttons Fixes issue #18 --- winamp.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/winamp.js b/winamp.js index 798a640f..07aadeab 100755 --- a/winamp.js +++ b/winamp.js @@ -21,7 +21,7 @@ function Media (audioId) { /* Actions */ this.previous = function() { - this.audio.currentTime = 0; + // Implement this when we support playlists }; this.play = function() { this.audio.play(); @@ -34,7 +34,7 @@ function Media (audioId) { this.audio.currentTime = 0; }; this.next = function() { - this.audio.currentTime = this.audio.duration; + // Implement this when we support playlists }; this.toggleRepeat = function() { this.audio.loop = !this.audio.loop; @@ -176,7 +176,6 @@ function Winamp () { this.media.addEventListener('ended', function() { self.setStatus('stop'); - self.media.previous(); }); this.nodes.shade.onclick = function() { @@ -194,7 +193,7 @@ function Winamp () { } this.nodes.previous.onclick = function() { - self.media.previous(); + // Implement this when we support playlists } this.nodes.play.onclick = function() { @@ -210,7 +209,7 @@ function Winamp () { self.setStatus('stop'); } this.nodes.next.onclick = function() { - self.media.next(); + // Implement this when we support playlists } this.nodes.eject.onclick = function() {