diff options
Diffstat (limited to 'addons/webinterface.default')
-rwxr-xr-x | addons/webinterface.default/js/NowPlayingManager.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/addons/webinterface.default/js/NowPlayingManager.js b/addons/webinterface.default/js/NowPlayingManager.js index 1d17c9dc07..18c108f6ff 100755 --- a/addons/webinterface.default/js/NowPlayingManager.js +++ b/addons/webinterface.default/js/NowPlayingManager.js @@ -141,6 +141,27 @@ NowPlayingManager.prototype = { $('#pbStop').bind('click', jQuery.proxy(this.stopTrack, this)); $('#pbPlay').bind('click', jQuery.proxy(this.playPauseTrack, this)); $('#pbPause').bind('click', jQuery.proxy(this.playPauseTrack, this)); + that = this + $(document).keypress(function(event) { + switch (event.which) { + case 32: //spacebar + event.preventDefault() + jQuery.proxy(that.playPauseTrack, that)(); + break; + case 120: //x key + event.preventDefault() + jQuery.proxy(that.stopTrack, that)(); + break; + case 44: //period key + event.preventDefault() + jQuery.proxy(that.nextTrack, that)(); + break; + case 46: //comma key + event.preventDefault() + jQuery.proxy(that.prevTrack, that)(); + break; + } + }); }, showPlaylist: function() { $('#nextText').html('Playlist: '); |