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

Unified Diff: chrome/browser/resources/file_manager/js/photo/slide_mode.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/photo/slide_mode.js
diff --git a/chrome/browser/resources/file_manager/js/photo/slide_mode.js b/chrome/browser/resources/file_manager/js/photo/slide_mode.js
index 1cdd6a8909f9be0ae8d4ae596dbc50ec4a88058c..954b0618b704046e228b1f551734189ab8f2281a 100644
--- a/chrome/browser/resources/file_manager/js/photo/slide_mode.js
+++ b/chrome/browser/resources/file_manager/js/photo/slide_mode.js
@@ -137,6 +137,7 @@ SlideMode.prototype.initDom_ = function() {
this.mediaControls_ = new VideoControls(
this.mediaToolbar_,
this.showErrorBanner_.bind(this, 'VIDEO_ERROR'),
+ this.displayStringFunction_.bind(this),
this.toggleFullScreen_.bind(this),
this.container_);
@@ -761,11 +762,20 @@ SlideMode.prototype.onBeforeUnload = function() {
/**
* Click handler for the image container.
+ *
+ * @param {Event} event Mouse click event.
* @private
*/
-SlideMode.prototype.onClick_ = function() {
- if (this.isShowingVideo_())
+SlideMode.prototype.onClick_ = function(event) {
+ if (!this.isShowingVideo_())
+ return;
+ if (event.ctrlKey) {
+ this.mediaControls_.toggleLoopedModeWithFeedback(true);
+ if (!this.mediaControls_.isPlaying())
+ this.mediaControls_.togglePlayStateWithFeedback();
+ } else {
this.mediaControls_.togglePlayStateWithFeedback();
+ }
};
/**

Powered by Google App Engine
This is Rietveld 408576698