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

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: Nit comments. 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 'Right':
fukino 2016/04/14 05:42:47 Please keep the behaviors on Up/Down.
oka 2016/04/14 05:55:30 Done.
377 if (event.target.id !== 'volumeSlider')
378 this.player_.$.audioController.smallSkip(true);
379 break;
380 case 'Left':
381 if (event.target.id !== 'volumeSlider')
382 this.player_.$.audioController.smallSkip(false);
383 break;
384 case 'U+004C': // L
385 this.player_.$.audioController.bigSkip(true);
386 break;
387 case 'U+004A': // J
388 this.player_.$.audioController.bigSkip(false);
389 break;
371 } 390 }
372 }; 391 };
373 392
374 /* Keep the below constants in sync with the CSS. */ 393 /* Keep the below constants in sync with the CSS. */
375 394
376 /** 395 /**
377 * Window header size in pixels. 396 * Window header size in pixels.
378 * @type {number} 397 * @type {number}
379 * @const 398 * @const
380 */ 399 */
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 // TODO(yoshiki): Handle error in better way. 606 // TODO(yoshiki): Handle error in better way.
588 this.title = metadata.mediaTitle || this.getDefaultTitle(); 607 this.title = metadata.mediaTitle || this.getDefaultTitle();
589 this.artist = error || metadata.mediaArtist || this.getDefaultArtist(); 608 this.artist = error || metadata.mediaArtist || this.getDefaultArtist();
590 this.artworkUrl = metadata.contentThumbnailUrl || ""; 609 this.artworkUrl = metadata.contentThumbnailUrl || "";
591 }; 610 };
592 611
593 // Starts loading the audio player. 612 // Starts loading the audio player.
594 window.addEventListener('DOMContentLoaded', function(e) { 613 window.addEventListener('DOMContentLoaded', function(e) {
595 AudioPlayer.load(); 614 AudioPlayer.load();
596 }); 615 });
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