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 /** | 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 * @type {number} | 325 * @type {number} |
326 * @const | 326 * @const |
327 */ | 327 */ |
328 AudioPlayer.HEADER_HEIGHT = 33; // 32px + border 1px | 328 AudioPlayer.HEADER_HEIGHT = 33; // 32px + border 1px |
329 | 329 |
330 /** | 330 /** |
331 * Track height in pixels. | 331 * Track height in pixels. |
332 * @type {number} | 332 * @type {number} |
333 * @const | 333 * @const |
334 */ | 334 */ |
335 AudioPlayer.TRACK_HEIGHT = 44; | 335 AudioPlayer.TRACK_HEIGHT = 48; |
336 | 336 |
337 /** | 337 /** |
338 * Controls bar height in pixels. | 338 * Controls bar height in pixels. |
339 * @type {number} | 339 * @type {number} |
340 * @const | 340 * @const |
341 */ | 341 */ |
342 AudioPlayer.CONTROLS_HEIGHT = 73; // 72px + border 1px | 342 AudioPlayer.CONTROLS_HEIGHT = 96; |
343 | 343 |
344 /** | 344 /** |
345 * Default number of items in the expanded mode. | 345 * Default number of items in the expanded mode. |
346 * @type {number} | 346 * @type {number} |
347 * @const | 347 * @const |
348 */ | 348 */ |
349 AudioPlayer.DEFAULT_EXPANDED_ITEMS = 5; | 349 AudioPlayer.DEFAULT_EXPANDED_ITEMS = 5; |
350 | 350 |
351 /** | 351 /** |
352 * Minimum size of the window in the expanded mode in pixels. | 352 * Minimum size of the window in the expanded mode in pixels. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 // TODO(yoshiki): Handle error in better way. | 453 // TODO(yoshiki): Handle error in better way. |
454 // TODO(yoshiki): implement artwork (metadata.thumbnail) | 454 // TODO(yoshiki): implement artwork (metadata.thumbnail) |
455 this.title = metadata.mediaTitle || this.getDefaultTitle(); | 455 this.title = metadata.mediaTitle || this.getDefaultTitle(); |
456 this.artist = error || metadata.mediaArtist || this.getDefaultArtist(); | 456 this.artist = error || metadata.mediaArtist || this.getDefaultArtist(); |
457 }; | 457 }; |
458 | 458 |
459 // Starts loading the audio player. | 459 // Starts loading the audio player. |
460 window.addEventListener('DOMContentLoaded', function(e) { | 460 window.addEventListener('DOMContentLoaded', function(e) { |
461 AudioPlayer.load(); | 461 AudioPlayer.load(); |
462 }); | 462 }); |
OLD | NEW |