Video Player: Automatically load next video

Whenever a video playback finishes, the users are required to manually
skip to the next video on the list. This patch enables the next video to
be loaded automatically, but only if the current one is not playing in
loop mode.

BUG=393318
R=yoshiki@chromium.org
TEST=manually tested
Signed-off-by: default avatarEduardo Lima (Etrunko) <eduardo.lima@intel.com>

Review URL: https://codereview.chromium.org/385113007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282966 0039d316-1c4b-4281-b951-d872f2087c98
parent aebf4624
...@@ -104,6 +104,15 @@ FullWindowVideoControls.prototype.toggleFullScreen_ = function() { ...@@ -104,6 +104,15 @@ FullWindowVideoControls.prototype.toggleFullScreen_ = function() {
util.toggleFullScreen(appWindow, !util.isFullScreen(appWindow)); util.toggleFullScreen(appWindow, !util.isFullScreen(appWindow));
}; };
/**
* Media completion handler.
*/
FullWindowVideoControls.prototype.onMediaComplete = function() {
VideoControls.prototype.onMediaComplete.apply(this, arguments);
if (!this.getMedia().loop)
player.advance_(1);
};
/** /**
* @constructor * @constructor
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment