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

Unified Diff: chrome/browser/resources/file_manager/js/media/video_player.js

Issue 17153007: Enable looping of videos in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/media/video_player.js
diff --git a/chrome/browser/resources/file_manager/js/media/video_player.js b/chrome/browser/resources/file_manager/js/media/video_player.js
index 040b08fc44cf9c75fe9b969762e972b466f29a76..0f7a8fc602fbcc67e48030249d5171fdb7998a51 100644
--- a/chrome/browser/resources/file_manager/js/media/video_player.js
+++ b/chrome/browser/resources/file_manager/js/media/video_player.js
@@ -50,6 +50,7 @@ function FullWindowVideoControls(
VideoControls.call(this,
controlsContainer,
onPlaybackError,
+ loadTimeData.getString.bind(loadTimeData),
this.toggleFullScreen_.bind(this),
videoContainer);
@@ -71,8 +72,15 @@ function FullWindowVideoControls(
}
}.bind(this));
- videoContainer.addEventListener('click',
- this.togglePlayStateWithFeedback.bind(this));
+ videoContainer.addEventListener('click', function(e) {
+ if (event.ctrlKey) {
+ this.toggleLoopedModeWithFeedback(true);
+ if (!this.isPlaying())
+ this.togglePlayStateWithFeedback();
+ } else {
+ this.togglePlayStateWithFeedback();
+ }
+ }.bind(this));
this.inactivityWatcher_ = new MouseInactivityWatcher(playerContainer);
this.__defineGetter__('inactivityWatcher', function() {

Powered by Google App Engine
This is Rietveld 408576698