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

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

Issue 414623003: Video Player: Use external entries instead of isolated entries (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
Index: ui/file_manager/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index 81ba71bede20c22d6a21180d5772b45e5741eb3b..6e31ee75117208e9e2f1609eb6d424b7bb9f487d 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -245,17 +245,16 @@ function unload() {
/**
* Loads the video file.
- * @param {string} url URL of the video file.
- * @param {string} title Title of the video file.
+ * @param {Object} video Data of the video file.
* @param {function()=} opt_callback Completion callback.
* @private
*/
-VideoPlayer.prototype.loadVideo_ = function(url, title, opt_callback) {
+VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
this.unloadVideo();
- document.title = title;
+ document.title = video.title;
- document.querySelector('#title').innerText = title;
+ document.querySelector('#title').innerText = video.title;
var videoPlayerElement = document.querySelector('#video-player');
if (this.currentPos_ === (this.videos_.length - 1))
@@ -289,7 +288,7 @@ VideoPlayer.prototype.loadVideo_ = function(url, title, opt_callback) {
document.querySelector('#video-container').appendChild(this.videoElement_);
this.controls.attachMedia(this.videoElement_);
- this.videoElement_.src = url;
+ this.videoElement_.src = video.url;
}
this.videoElement_.load();
@@ -391,7 +390,7 @@ VideoPlayer.prototype.advance_ = function(direction) {
*/
VideoPlayer.prototype.reloadCurrentVideo_ = function(opt_callback) {
var currentVideo = this.videos_[this.currentPos_];
- this.loadVideo_(currentVideo.fileUrl, currentVideo.entry.name, opt_callback);
+ this.loadVideo_(currentVideo, opt_callback);
};
/**

Powered by Google App Engine
This is Rietveld 408576698