Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1460)

Side by Side Diff: ui/file_manager/audio_player/js/audio_player.js

Issue 1883813005: Add shortcuts to audio player. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert 'send to start when paused' for now. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/file_manager/audio_player/elements/control_panel.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Overrided metadata worker's path. 6 * Overrided metadata worker's path.
7 * @type {string} 7 * @type {string}
8 */ 8 */
9 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; 9 ContentMetadataProvider.WORKER_SCRIPT = '/js/metadata_worker.js';
10 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 break; 361 break;
362 case 'Ctrl-Shift-U+004A': // Ctrl+Shift+J 362 case 'Ctrl-Shift-U+004A': // Ctrl+Shift+J
363 chrome.fileManagerPrivate.openInspector('console'); 363 chrome.fileManagerPrivate.openInspector('console');
364 break; 364 break;
365 case 'Ctrl-Shift-U+0043': // Ctrl+Shift+C 365 case 'Ctrl-Shift-U+0043': // Ctrl+Shift+C
366 chrome.fileManagerPrivate.openInspector('element'); 366 chrome.fileManagerPrivate.openInspector('element');
367 break; 367 break;
368 case 'Ctrl-Shift-U+0042': // Ctrl+Shift+B 368 case 'Ctrl-Shift-U+0042': // Ctrl+Shift+B
369 chrome.fileManagerPrivate.openInspector('background'); 369 chrome.fileManagerPrivate.openInspector('background');
370 break; 370 break;
371
372 case 'U+0020': // Space
373 case 'U+004B': // K
374 this.player_.$.audioController.playClick();
375 break;
376 case 'Up':
377 case 'Right':
378 if (event.target.id !== 'volumeSlider')
379 this.player_.$.audioController.smallSkip(true);
380 break;
381 case 'Down':
382 case 'Left':
383 if (event.target.id !== 'volumeSlider')
384 this.player_.$.audioController.smallSkip(false);
385 break;
386 case 'U+004C': // L
387 this.player_.$.audioController.bigSkip(true);
388 break;
389 case 'U+004A': // J
390 this.player_.$.audioController.bigSkip(false);
391 break;
371 } 392 }
372 }; 393 };
373 394
374 /* Keep the below constants in sync with the CSS. */ 395 /* Keep the below constants in sync with the CSS. */
375 396
376 /** 397 /**
377 * Window header size in pixels. 398 * Window header size in pixels.
378 * @type {number} 399 * @type {number}
379 * @const 400 * @const
380 */ 401 */
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 // TODO(yoshiki): Handle error in better way. 608 // TODO(yoshiki): Handle error in better way.
588 this.title = metadata.mediaTitle || this.getDefaultTitle(); 609 this.title = metadata.mediaTitle || this.getDefaultTitle();
589 this.artist = error || metadata.mediaArtist || this.getDefaultArtist(); 610 this.artist = error || metadata.mediaArtist || this.getDefaultArtist();
590 this.artworkUrl = metadata.contentThumbnailUrl || ""; 611 this.artworkUrl = metadata.contentThumbnailUrl || "";
591 }; 612 };
592 613
593 // Starts loading the audio player. 614 // Starts loading the audio player.
594 window.addEventListener('DOMContentLoaded', function(e) { 615 window.addEventListener('DOMContentLoaded', function(e) {
595 AudioPlayer.load(); 616 AudioPlayer.load();
596 }); 617 });
OLDNEW
« no previous file with comments | « ui/file_manager/audio_player/elements/control_panel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698