Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Side by Side Diff: ui/file_manager/video_player/js/media_controls.js

Issue 611243003: Rename the VideoPlayer-related string IDs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 /** 1088 /**
1089 * Toggles the looped mode with feedback. 1089 * Toggles the looped mode with feedback.
1090 * @param {boolean} on Whether enabled or not. 1090 * @param {boolean} on Whether enabled or not.
1091 */ 1091 */
1092 VideoControls.prototype.toggleLoopedModeWithFeedback = function(on) { 1092 VideoControls.prototype.toggleLoopedModeWithFeedback = function(on) {
1093 if (!this.getMedia().duration) 1093 if (!this.getMedia().duration)
1094 return; 1094 return;
1095 this.toggleLoopedMode(on); 1095 this.toggleLoopedMode(on);
1096 if (on) { 1096 if (on) {
1097 // TODO(mtomasz): Simplify, crbug.com/254318. 1097 // TODO(mtomasz): Simplify, crbug.com/254318.
1098 this.showTextBanner_('GALLERY_VIDEO_LOOPED_MODE'); 1098 this.showTextBanner_('VIDEO_PLAYER_LOOPED_MODE');
1099 } 1099 }
1100 }; 1100 };
1101 1101
1102 /** 1102 /**
1103 * Toggles the looped mode. 1103 * Toggles the looped mode.
1104 * @param {boolean} on Whether enabled or not. 1104 * @param {boolean} on Whether enabled or not.
1105 */ 1105 */
1106 VideoControls.prototype.toggleLoopedMode = function(on) { 1106 VideoControls.prototype.toggleLoopedMode = function(on) {
1107 this.getMedia().loop = on; 1107 this.getMedia().loop = on;
1108 }; 1108 };
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1255 AudioControls.prototype.onAdvanceClick_ = function(forward) { 1255 AudioControls.prototype.onAdvanceClick_ = function(forward) {
1256 if (!forward && 1256 if (!forward &&
1257 (this.getMedia().currentTime > AudioControls.TRACK_RESTART_THRESHOLD)) { 1257 (this.getMedia().currentTime > AudioControls.TRACK_RESTART_THRESHOLD)) {
1258 // We are far enough from the beginning of the current track. 1258 // We are far enough from the beginning of the current track.
1259 // Restart it instead of than skipping to the previous one. 1259 // Restart it instead of than skipping to the previous one.
1260 this.getMedia().currentTime = 0; 1260 this.getMedia().currentTime = 0;
1261 } else { 1261 } else {
1262 this.advanceTrack_(forward); 1262 this.advanceTrack_(forward);
1263 } 1263 }
1264 }; 1264 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698