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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 Polymer('audio-player', { | 7 Polymer('audio-player', { |
8 /** | 8 /** |
9 * Child Elements | 9 * Child Elements |
10 */ | 10 */ |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 if (this.audioElement.readyState !== 0) | 123 if (this.audioElement.readyState !== 0) |
124 this.audioElement.currentTime = this.audioController.time / 1000; | 124 this.audioElement.currentTime = this.audioController.time / 1000; |
125 }, | 125 }, |
126 | 126 |
127 /** | 127 /** |
128 * Invoked when audioController.shuffle is changed. | 128 * Invoked when audioController.shuffle is changed. |
129 * @param {boolean} oldValue old value. | 129 * @param {boolean} oldValue old value. |
130 * @param {boolean} newValue new value. | 130 * @param {boolean} newValue new value. |
131 */ | 131 */ |
132 onControllerShuffleChanged: function(oldValue, newValue) { | 132 onControllerShuffleChanged: function(oldValue, newValue) { |
133 // TODO(yoshiki): Implement shuffle mode. | 133 this.trackList.shuffle = newValue; |
134 }, | 134 }, |
135 | 135 |
136 /** | 136 /** |
137 * Invoked when audioController.repeat is changed. | 137 * Invoked when audioController.repeat is changed. |
138 * @param {boolean} oldValue old value. | 138 * @param {boolean} oldValue old value. |
139 * @param {boolean} newValue new value. | 139 * @param {boolean} newValue new value. |
140 */ | 140 */ |
141 onControllerRepeatChanged: function(oldValue, newValue) { | 141 onControllerRepeatChanged: function(oldValue, newValue) { |
142 this.trackList.repeat = newValue; | 142 this.trackList.repeat = newValue; |
143 }, | 143 }, |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 this.audioController.playlistExpanded = !!expand; | 300 this.audioController.playlistExpanded = !!expand; |
301 }, | 301 }, |
302 | 302 |
303 /** | 303 /** |
304 * Invoked when the audio player is being unloaded. | 304 * Invoked when the audio player is being unloaded. |
305 */ | 305 */ |
306 onPageUnload: function() { | 306 onPageUnload: function() { |
307 this.audioElement.src = ''; // Hack to prevent crashing. | 307 this.audioElement.src = ''; // Hack to prevent crashing. |
308 }, | 308 }, |
309 }); | 309 }); |
OLD | NEW |