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

Unified Diff: ui/file_manager/audio_player/elements/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/audio_player/js/audio_player.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/audio_player/elements/audio_player.js
diff --git a/ui/file_manager/audio_player/elements/audio_player.js b/ui/file_manager/audio_player/elements/audio_player.js
index a9945a343e69f94627a2b01a065e3b1074303c19..7e3dfd47a0a111d785e8c38679e96f0d33579178 100644
--- a/ui/file_manager/audio_player/elements/audio_player.js
+++ b/ui/file_manager/audio_player/elements/audio_player.js
@@ -349,6 +349,21 @@ Polymer({
},
/**
+ * Notifis the track-list element that the metadata for specified track is
+ * updated.
+ * @param {number} index The index of the track whose metadata is updated.
+ */
+ notifyTrackMetadataUpdated: function(index) {
+ if (index < 0 || index >= this.tracks.length)
+ return;
+
+ this.$.trackList.notifyPath('tracks.' + index + '.title',
+ this.tracks[index].title);
+ this.$.trackList.notifyPath('tracks.' + index + '.artist',
+ this.tracks[index].artist);
+ },
+
+ /**
* Invoked when the audio player is being unloaded.
*/
onPageUnload: function() {
« no previous file with comments | « no previous file | ui/file_manager/audio_player/js/audio_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698