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

Side by Side Diff: ui/file_manager/video_player/js/media_controls.js

Issue 1839953002: Video Player: Call video element's load method on loading video file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/file_manager/video_player/js/video_player.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview MediaControls class implements media playback controls 6 * @fileoverview MediaControls class implements media playback controls
7 * that exist outside of the audio/video HTML element. 7 * that exist outside of the audio/video HTML element.
8 */ 8 */
9 9
10 /** 10 /**
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
612 this.textBanner_.removeAttribute('visible'); 612 this.textBanner_.removeAttribute('visible');
613 613
614 // Reflect the media state in the UI. 614 // Reflect the media state in the UI.
615 this.onMediaDuration_(); 615 this.onMediaDuration_();
616 this.onMediaPlay_(this.isPlaying()); 616 this.onMediaPlay_(this.isPlaying());
617 this.onMediaProgress_(); 617 this.onMediaProgress_();
618 if (this.volume_) { 618 if (this.volume_) {
619 /* Copy the user selected volume to the new media element. */ 619 /* Copy the user selected volume to the new media element. */
620 this.savedVolume_ = this.media_.volume = this.volume_.ratio; 620 this.savedVolume_ = this.media_.volume = this.volume_.ratio;
621 } 621 }
622 if (this.media_.textTracks.length > 0) { 622 if (this.media_.textTracks && this.media_.textTracks.length > 0) {
yawano 2016/03/29 08:29:23 Very small optional nit: I don't think we need to
fukino 2016/03/29 08:48:28 If the media is CastVideoElement, the textTracks i
yawano 2016/03/29 08:59:14 I get it. Thank you! No, I don't think we need to
623 this.attachTextTrack_(this.media_.textTracks[0]); 623 this.attachTextTrack_(this.media_.textTracks[0]);
624 } else { 624 } else {
625 this.attachTextTrack_(null); 625 this.attachTextTrack_(null);
626 } 626 }
627 }; 627 };
628 628
629 /** 629 /**
630 * Detach media event handlers. 630 * Detach media event handlers.
631 */ 631 */
632 MediaControls.prototype.detachMedia = function() { 632 MediaControls.prototype.detachMedia = function() {
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 } else { 1041 } else {
1042 this.container_.removeAttribute('fullscreen'); 1042 this.container_.removeAttribute('fullscreen');
1043 } 1043 }
1044 1044
1045 if (this.fullscreenButton_) { 1045 if (this.fullscreenButton_) {
1046 this.fullscreenButton_.setAttribute('aria-label', 1046 this.fullscreenButton_.setAttribute('aria-label',
1047 fullscreen ? str('VIDEO_PLAYER_EXIT_FULL_SCREEN_BUTTON_LABEL') 1047 fullscreen ? str('VIDEO_PLAYER_EXIT_FULL_SCREEN_BUTTON_LABEL')
1048 : str('VIDEO_PLAYER_FULL_SCREEN_BUTTON_LABEL'));; 1048 : str('VIDEO_PLAYER_FULL_SCREEN_BUTTON_LABEL'));;
1049 } 1049 }
1050 }; 1050 };
OLDNEW
« no previous file with comments | « no previous file | ui/file_manager/video_player/js/video_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698