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

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

Issue 1581573004: Audio Player: Notify track metadata update to track-list element explicitly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a check for index range. Created 4 years, 11 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/audio_player.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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 /** 202 /**
203 * Displays track's metadata. 203 * Displays track's metadata.
204 * @param {number} track Track number. 204 * @param {number} track Track number.
205 * @param {Object} metadata Metadata object. 205 * @param {Object} metadata Metadata object.
206 * @param {string=} opt_error Error message. 206 * @param {string=} opt_error Error message.
207 * @private 207 * @private
208 */ 208 */
209 AudioPlayer.prototype.displayMetadata_ = function(track, metadata, opt_error) { 209 AudioPlayer.prototype.displayMetadata_ = function(track, metadata, opt_error) {
210 this.player_.tracks[track].setMetadata(metadata, opt_error); 210 this.player_.tracks[track].setMetadata(metadata, opt_error);
211 this.player_.notifyTrackMetadataUpdated(track);
211 }; 212 };
212 213
213 /** 214 /**
214 * Closes audio player when a volume containing the selected item is unmounted. 215 * Closes audio player when a volume containing the selected item is unmounted.
215 * @param {Event} event The unmount event. 216 * @param {Event} event The unmount event.
216 * @private 217 * @private
217 */ 218 */
218 AudioPlayer.prototype.onExternallyUnmounted_ = function(event) { 219 AudioPlayer.prototype.onExternallyUnmounted_ = function(event) {
219 if (!this.selectedEntry_) 220 if (!this.selectedEntry_)
220 return; 221 return;
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 // TODO(yoshiki): Handle error in better way. 495 // TODO(yoshiki): Handle error in better way.
495 // TODO(yoshiki): implement artwork (metadata.thumbnail) 496 // TODO(yoshiki): implement artwork (metadata.thumbnail)
496 this.title = metadata.mediaTitle || this.getDefaultTitle(); 497 this.title = metadata.mediaTitle || this.getDefaultTitle();
497 this.artist = error || metadata.mediaArtist || this.getDefaultArtist(); 498 this.artist = error || metadata.mediaArtist || this.getDefaultArtist();
498 }; 499 };
499 500
500 // Starts loading the audio player. 501 // Starts loading the audio player.
501 window.addEventListener('DOMContentLoaded', function(e) { 502 window.addEventListener('DOMContentLoaded', function(e) {
502 AudioPlayer.load(); 503 AudioPlayer.load();
503 }); 504 });
OLDNEW
« no previous file with comments | « ui/file_manager/audio_player/elements/audio_player.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698