OLD | NEW |
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 document.addEventListener('DOMContentLoaded', function() { | 5 document.addEventListener('DOMContentLoaded', function() { |
6 // Test harness sets the search string to prevent the automatic load. | 6 // Test harness sets the search string to prevent the automatic load. |
7 // It calls AudioPlayer.load() explicitly after initializing | 7 // It calls AudioPlayer.load() explicitly after initializing |
8 // the |chrome| variable with an appropriate mock object. | 8 // the |chrome| variable with an appropriate mock object. |
9 if (!document.location.search) { | 9 if (!document.location.search) { |
10 AudioPlayer.load(); | 10 AudioPlayer.load(); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 }; | 264 }; |
265 | 265 |
266 AudioPlayer.TrackInfo.prototype.setMetadata = function(metadata) { | 266 AudioPlayer.TrackInfo.prototype.setMetadata = function(metadata) { |
267 if (metadata.thumbnailURL) { | 267 if (metadata.thumbnailURL) { |
268 this.art_.classList.remove('blank'); | 268 this.art_.classList.remove('blank'); |
269 this.img_.src = metadata.thumbnailURL; | 269 this.img_.src = metadata.thumbnailURL; |
270 } | 270 } |
271 this.title_.textContent = metadata.title || this.getDefaultTitle(); | 271 this.title_.textContent = metadata.title || this.getDefaultTitle(); |
272 this.artist_.textContent = metadata.artist || this.getDefaultArtist(); | 272 this.artist_.textContent = metadata.artist || this.getDefaultArtist(); |
273 }; | 273 }; |
OLD | NEW |