| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Overrided metadata worker's path. |
| 9 * @type {string} |
| 10 * @const |
| 11 */ |
| 12 ContentProvider.WORKER_SCRIPT = '/js/metadata_worker.js'; |
| 13 |
| 14 /** |
| 8 * @param {HTMLElement} container Container element. | 15 * @param {HTMLElement} container Container element. |
| 9 * @constructor | 16 * @constructor |
| 10 */ | 17 */ |
| 11 function AudioPlayer(container) { | 18 function AudioPlayer(container) { |
| 12 this.container_ = container; | 19 this.container_ = container; |
| 13 this.volumeManager_ = new VolumeManagerWrapper( | 20 this.volumeManager_ = new VolumeManagerWrapper( |
| 14 VolumeManagerWrapper.DriveEnabledStatus.DRIVE_ENABLED); | 21 VolumeManagerWrapper.DriveEnabledStatus.DRIVE_ENABLED); |
| 15 this.metadataCache_ = MetadataCache.createFull(this.volumeManager_); | 22 this.metadataCache_ = MetadataCache.createFull(this.volumeManager_); |
| 16 this.selectedEntry_ = null; | 23 this.selectedEntry_ = null; |
| 17 | 24 |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 this.title = (metadata.media && metadata.media.title) || | 427 this.title = (metadata.media && metadata.media.title) || |
| 421 this.getDefaultTitle(); | 428 this.getDefaultTitle(); |
| 422 this.artist = error || | 429 this.artist = error || |
| 423 (metadata.media && metadata.media.artist) || this.getDefaultArtist(); | 430 (metadata.media && metadata.media.artist) || this.getDefaultArtist(); |
| 424 }; | 431 }; |
| 425 | 432 |
| 426 // Starts loading the audio player. | 433 // Starts loading the audio player. |
| 427 window.addEventListener('polymer-ready', function(e) { | 434 window.addEventListener('polymer-ready', function(e) { |
| 428 AudioPlayer.load(); | 435 AudioPlayer.load(); |
| 429 }); | 436 }); |
| OLD | NEW |