OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Polymer({ | 5 Polymer({ |
6 is: 'audio-player', | 6 is: 'audio-player', |
7 | 7 |
8 properties: { | 8 properties: { |
9 /** | 9 /** |
10 * Flag whether the audio is playing or paused. True if playing, or false | 10 * Flag whether the audio is playing or paused. True if playing, or false |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 reflectToAttribute: true | 91 reflectToAttribute: true |
92 }, | 92 }, |
93 | 93 |
94 /** | 94 /** |
95 * The number of played tracks. (exposed publicly for tests) | 95 * The number of played tracks. (exposed publicly for tests) |
96 */ | 96 */ |
97 playcount: { | 97 playcount: { |
98 type: Number, | 98 type: Number, |
99 value: 0, | 99 value: 0, |
100 reflectToAttribute: true | 100 reflectToAttribute: true |
101 }, | |
102 | |
103 ariaLabels: { | |
104 type: Object | |
105 } | 101 } |
106 }, | 102 }, |
107 | 103 |
108 /** | 104 /** |
109 * The last playing state when user starts dragging the seek bar. | 105 * The last playing state when user starts dragging the seek bar. |
110 * @private {boolean} | 106 * @private {boolean} |
111 */ | 107 */ |
112 wasPlayingOnDragStart_: false, | 108 wasPlayingOnDragStart_: false, |
113 | 109 |
114 /** | 110 /** |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 | 485 |
490 /** | 486 /** |
491 * Computes volume value for audio element. (should be in [0.0, 1.0]) | 487 * Computes volume value for audio element. (should be in [0.0, 1.0]) |
492 * @param {number} volume Volume which is set in the UI. ([0, 100]) | 488 * @param {number} volume Volume which is set in the UI. ([0, 100]) |
493 * @return {number} | 489 * @return {number} |
494 */ | 490 */ |
495 computeAudioVolume_: function(volume) { | 491 computeAudioVolume_: function(volume) { |
496 return volume / 100; | 492 return volume / 100; |
497 } | 493 } |
498 }); | 494 }); |
OLD | NEW |