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 469e09e95bf60a51ed0fceec37301a04c7391792..4b9837698ec249a23c7382c277692e62bcd13da3 100644 |
--- a/ui/file_manager/video_player/js/video_player.js |
+++ b/ui/file_manager/video_player/js/video_player.js |
@@ -366,7 +366,6 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) { |
this.currentSession_ = session; |
this.videoElement_ = new CastVideoElement(media, session); |
- this.controls.attachMedia(this.videoElement_); |
}.bind(this)); |
}.bind(this)); |
} else { |
@@ -377,7 +376,6 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) { |
getRequiredElement('video-container').appendChild(this.videoElement_); |
var videoUrl = video.toURL(); |
- this.controls.attachMedia(this.videoElement_); |
var source = document.createElement('source'); |
source.src = videoUrl; |
this.videoElement_.appendChild(source); |
@@ -424,6 +422,7 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) { |
chrome.power.releaseKeepAwake(); |
this.updateInactivityWatcherState_(); |
}.wrap(this)); |
+ this.controls.attachMedia(this.videoElement_); |
// TODO(ryoh): |
// If you modify the video element that is already inserted, |
// you have to call load() method. |