OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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'; | |
6 | |
7 /** | 5 /** |
8 * @param {Element} playerContainer Main container. | 6 * @param {Element} playerContainer Main container. |
9 * @param {Element} videoContainer Container for the video element. | 7 * @param {Element} videoContainer Container for the video element. |
10 * @param {Element} controlsContainer Container for video controls. | 8 * @param {Element} controlsContainer Container for video controls. |
11 * @constructor | 9 * @constructor |
12 */ | 10 */ |
13 function FullWindowVideoControls( | 11 function FullWindowVideoControls( |
14 playerContainer, videoContainer, controlsContainer) { | 12 playerContainer, videoContainer, controlsContainer) { |
15 VideoControls.call(this, | 13 VideoControls.call(this, |
16 controlsContainer, | 14 controlsContainer, |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 var initPromise = Promise.all( | 664 var initPromise = Promise.all( |
667 [new Promise(initVideos.wrap(null)), | 665 [new Promise(initVideos.wrap(null)), |
668 new Promise(initStrings.wrap(null)), | 666 new Promise(initStrings.wrap(null)), |
669 new Promise(util.addPageLoadHandler.wrap(null))]); | 667 new Promise(util.addPageLoadHandler.wrap(null))]); |
670 | 668 |
671 initPromise.then(function(results) { | 669 initPromise.then(function(results) { |
672 var videos = results[0]; | 670 var videos = results[0]; |
673 player.prepare(videos); | 671 player.prepare(videos); |
674 return new Promise(player.playFirstVideo.wrap(player)); | 672 return new Promise(player.playFirstVideo.wrap(player)); |
675 }.wrap(null)); | 673 }.wrap(null)); |
OLD | NEW |