Audio Player: Add support for Media Keys

BUG=393346
R=yoshiki@chromium.org
TEST=Manually tested with external USB keyboard
Signed-off-by: default avatarEduardo Lima (Etrunko) <eduardo.lima@intel.com>

Review URL: https://codereview.chromium.org/386043004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283431 0039d316-1c4b-4281-b951-d872f2087c98
parent d01b8399
...@@ -339,6 +339,19 @@ Polymer('audio-player', { ...@@ -339,6 +339,19 @@ Polymer('audio-player', {
if (this.audioController.volumeSliderShown && this.model.volume > 9) if (this.audioController.volumeSliderShown && this.model.volume > 9)
this.model.volume -= 10; this.model.volume -= 10;
break; break;
case 'MediaNextTrack':
this.onControllerNextClicked();
break;
case 'MediaPlayPause':
var playing = this.audioController.playing;
this.onControllerPlayingChanged(playing, !playing);
break;
case 'MediaPreviousTrack':
this.onControllerPreviousClicked();
break;
case 'MediaStop':
// TODO: Define "Stop" behavior.
break;
} }
}, },
}); });
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