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

Unified Diff: ui/file_manager/video_player/js/media_controls.js

Issue 2263033002: Let a video resume automatically when changing the playback position after the playback has finished (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Let a video resume automatically when changing the playback position after the playback has finished Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/video_player/js/media_controls.js
diff --git a/ui/file_manager/video_player/js/media_controls.js b/ui/file_manager/video_player/js/media_controls.js
index b8a244efca5d5d6b73067d2edcc41c89bc1e9912..b718b12718298eebfed5a02ca5cf23e278d36e3a 100644
--- a/ui/file_manager/video_player/js/media_controls.js
+++ b/ui/file_manager/video_player/js/media_controls.js
@@ -345,6 +345,10 @@ MediaControls.prototype.onProgressChange_ = function(value) {
this.setSeeking_(false);
+ // Re-start playing the video when the seek bar is moved from ending point.
+ if (this.media_.ended)
+ this.play();
+
var current = this.media_.duration * value;
this.media_.currentTime = current;
this.updateTimeLabel_(current);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698