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 (function() { | 5 (function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Moves |target| element above |anchor| element, in order to match the | 9 * Moves |target| element above |anchor| element, in order to match the |
10 * bottom lines. | 10 * bottom lines. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 /** | 70 /** |
71 * Whether the shuffle button is ON. | 71 * Whether the shuffle button is ON. |
72 */ | 72 */ |
73 shuffle: { | 73 shuffle: { |
74 type: Boolean, | 74 type: Boolean, |
75 value: false, | 75 value: false, |
76 notify: true | 76 notify: true |
77 }, | 77 }, |
78 | 78 |
79 /** | 79 /** |
80 * Whether the repeat button is ON. | 80 * What mode the repeat button idicates. |
81 * repeat-modes can be "repeat-none", "repeat-all", "repeat-one". | |
81 */ | 82 */ |
82 repeat: { | 83 repeatMode: { |
83 type: Boolean, | 84 type: String, |
84 value: false, | 85 value: "repeat-none", |
85 notify: true | 86 notify: true |
86 }, | 87 }, |
87 | 88 |
88 /** | 89 /** |
89 * The audio volume. 0 is silent, and 100 is maximum loud. | 90 * The audio volume. 0 is silent, and 100 is maximum loud. |
90 */ | 91 */ |
91 volume: { | 92 volume: { |
92 type: Number, | 93 type: Number, |
93 value: 50, | 94 value: 50, |
94 notify: true, | 95 notify: true, |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
286 /** | 287 /** |
287 * Invoked when the ariaLabels property is changed. | 288 * Invoked when the ariaLabels property is changed. |
288 * @param {Object} ariaLabels | 289 * @param {Object} ariaLabels |
289 * @private | 290 * @private |
290 */ | 291 */ |
291 ariaLabelsChanged_: function(ariaLabels) { | 292 ariaLabelsChanged_: function(ariaLabels) { |
292 assert(ariaLabels); | 293 assert(ariaLabels); |
293 // TODO(fukino): Use data bindings. | 294 // TODO(fukino): Use data bindings. |
294 this.$.volumeSlider.setAttribute('aria-label', ariaLabels.volumeSlider); | 295 this.$.volumeSlider.setAttribute('aria-label', ariaLabels.volumeSlider); |
295 this.$.shuffle.setAttribute('aria-label', ariaLabels.shuffle); | 296 this.$.shuffle.setAttribute('aria-label', ariaLabels.shuffle); |
296 this.$.repeat.setAttribute('aria-label', ariaLabels.repeat); | 297 this.$.repeatMode.setAttribute('aria-label', ariaLabels.repeatMode); |
fukino
2016/09/09 05:31:45
ariaLabels.repeatMode is undefined.
harukam
2016/09/09 11:53:45
Acknowledged.
| |
297 this.$.previous.setAttribute('aria-label', ariaLabels.previous); | 298 this.$.previous.setAttribute('aria-label', ariaLabels.previous); |
298 this.$.play.setAttribute('aria-label', | 299 this.$.play.setAttribute('aria-label', |
299 this.playing ? ariaLabels.pause : ariaLabels.play); | 300 this.playing ? ariaLabels.pause : ariaLabels.play); |
300 this.$.next.setAttribute('aria-label', ariaLabels.next); | 301 this.$.next.setAttribute('aria-label', ariaLabels.next); |
301 this.$.volumeButton.setAttribute('aria-label', ariaLabels.volume); | 302 this.$.volumeButton.setAttribute('aria-label', ariaLabels.volume); |
302 this.$.playList.setAttribute('aria-label', ariaLabels.playList); | 303 this.$.playList.setAttribute('aria-label', ariaLabels.playList); |
303 this.$.timeSlider.setAttribute('aria-label', ariaLabels.seekSlider); | 304 this.$.timeSlider.setAttribute('aria-label', ariaLabels.seekSlider); |
304 this.$.volumeButton.setAttribute('aria-label', | 305 this.$.volumeButton.setAttribute('aria-label', |
305 this.volume !== 0 ? ariaLabels.mute : ariaLabels.unmute); | 306 this.volume !== 0 ? ariaLabels.mute : ariaLabels.unmute); |
306 this.$.volumeSlider.setAttribute('aria-label', ariaLabels.volumeSlider); | 307 this.$.volumeSlider.setAttribute('aria-label', ariaLabels.volumeSlider); |
307 }, | 308 }, |
308 }); | 309 }); |
309 })(); // Anonymous closure | 310 })(); // Anonymous closure |
OLD | NEW |