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 * @fileoverview MediaControls class implements media playback controls | 8 * @fileoverview MediaControls class implements media playback controls |
9 * that exist outside of the audio/video HTML element. | 9 * that exist outside of the audio/video HTML element. |
10 */ | 10 */ |
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1236 AudioControls.prototype.onAdvanceClick_ = function(forward) { | 1236 AudioControls.prototype.onAdvanceClick_ = function(forward) { |
1237 if (!forward && | 1237 if (!forward && |
1238 (this.getMedia().currentTime > AudioControls.TRACK_RESTART_THRESHOLD)) { | 1238 (this.getMedia().currentTime > AudioControls.TRACK_RESTART_THRESHOLD)) { |
1239 // We are far enough from the beginning of the current track. | 1239 // We are far enough from the beginning of the current track. |
1240 // Restart it instead of than skipping to the previous one. | 1240 // Restart it instead of than skipping to the previous one. |
1241 this.getMedia().currentTime = 0; | 1241 this.getMedia().currentTime = 0; |
1242 } else { | 1242 } else { |
1243 this.advanceTrack_(forward); | 1243 this.advanceTrack_(forward); |
1244 } | 1244 } |
1245 }; | 1245 }; |
OLD | NEW |