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

Side by Side Diff: chrome/browser/resources/file_manager/js/media/video_player.js

Issue 14316003: Fixed slide show in Files.app's gallery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/photo/slide_mode.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Display error message. 8 * Display error message.
9 * @param {string} message Message id. 9 * @param {string} message Message id.
10 */ 10 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 * @param {Element} playerContainer Main container. 44 * @param {Element} playerContainer Main container.
45 * @param {Element} videoContainer Container for the video element. 45 * @param {Element} videoContainer Container for the video element.
46 * @param {Element} controlsContainer Container for video controls. 46 * @param {Element} controlsContainer Container for video controls.
47 * @constructor 47 * @constructor
48 */ 48 */
49 function FullWindowVideoControls( 49 function FullWindowVideoControls(
50 playerContainer, videoContainer, controlsContainer) { 50 playerContainer, videoContainer, controlsContainer) {
51 VideoControls.call(this, 51 VideoControls.call(this,
52 controlsContainer, 52 controlsContainer,
53 onPlaybackError, 53 onPlaybackError,
54 this.toggleFullscreen_.bind(this), 54 this.toggleFullScreen_.bind(this),
55 videoContainer); 55 videoContainer);
56 56
57 this.playerContainer_ = playerContainer; 57 this.playerContainer_ = playerContainer;
58 58
59 this.updateStyle(); 59 this.updateStyle();
60 window.addEventListener('resize', this.updateStyle.bind(this)); 60 window.addEventListener('resize', this.updateStyle.bind(this));
61 61
62 document.addEventListener('keydown', function(e) { 62 document.addEventListener('keydown', function(e) {
63 if (e.keyIdentifier == 'U+0020') { // Space 63 if (e.keyIdentifier == 'U+0020') { // Space
64 this.togglePlayStateWithFeedback(); 64 this.togglePlayStateWithFeedback();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (!this.decodeState()) { 102 if (!this.decodeState()) {
103 VideoControls.prototype.restorePlayState.apply(this, arguments); 103 VideoControls.prototype.restorePlayState.apply(this, arguments);
104 this.play(); 104 this.play();
105 } 105 }
106 }; 106 };
107 107
108 /** 108 /**
109 * Toggles the full screen mode. 109 * Toggles the full screen mode.
110 * @private 110 * @private
111 */ 111 */
112 FullWindowVideoControls.prototype.toggleFullscreen_ = function() { 112 FullWindowVideoControls.prototype.toggleFullScreen_ = function() {
113 util.toggleFullScreen(this.playerContainer_.ownerDocument, 113 util.toggleFullScreen(this.playerContainer_.ownerDocument,
114 !util.isFullScreen()); 114 !util.isFullScreen());
115 }; 115 };
116 116
117 // TODO(mtomasz): Convert it to class members: crbug.com/171191. 117 // TODO(mtomasz): Convert it to class members: crbug.com/171191.
118 var decodeErrorOccured; 118 var decodeErrorOccured;
119 var video; 119 var video;
120 var controls; 120 var controls;
121 var metadataCache; 121 var metadataCache;
122 var volumeManager; 122 var volumeManager;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 webkitResolveLocalFileSystemURL(src, 270 webkitResolveLocalFileSystemURL(src,
271 function(entry) { 271 function(entry) {
272 var video = document.querySelector('video'); 272 var video = document.querySelector('video');
273 if (video.src != src) return; 273 if (video.src != src) return;
274 selectedItemFilesystemPath = entry.fullPath; 274 selectedItemFilesystemPath = entry.fullPath;
275 }); 275 });
276 }); 276 });
277 } 277 }
278 278
279 util.addPageLoadHandler(loadVideoPlayer); 279 util.addPageLoadHandler(loadVideoPlayer);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/photo/slide_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698