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

Unified Diff: ui/file_manager/file_manager/audio_player/js/audio_player.js

Issue 556493002: Video Player: Resume the playback position on launch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a JSdoc Created 6 years, 3 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/file_manager/audio_player/js/audio_player.js
diff --git a/ui/file_manager/file_manager/audio_player/js/audio_player.js b/ui/file_manager/file_manager/audio_player/js/audio_player.js
index f3603cd2702ae1c18d03d3aa1cb32121920767b8..adf827a07983fa610a51ac799807334ea890f354 100644
--- a/ui/file_manager/file_manager/audio_player/js/audio_player.js
+++ b/ui/file_manager/file_manager/audio_player/js/audio_player.js
@@ -198,13 +198,15 @@ AudioPlayer.prototype.onUnload = function() {
/**
* Selects a new track to play.
* @param {number} newTrack New track number.
+ * @param {number} time New playback position (in second).
* @private
*/
-AudioPlayer.prototype.select_ = function(newTrack) {
+AudioPlayer.prototype.select_ = function(newTrack, time) {
if (this.currentTrackIndex_ == newTrack) return;
this.currentTrackIndex_ = newTrack;
this.player_.currentTrackIndex = this.currentTrackIndex_;
+ this.player_.audioController.time = time;
Platform.performMicrotaskCheckpoint();
if (!window.appReopen)
« 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