Chromium Code Reviews| 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 33745c75cf678e65c5036b96762e535210ce3e6b..77aa508f9f5f29aa107c964253c66867a99d00d5 100644 |
| --- a/ui/file_manager/video_player/js/media_controls.js |
| +++ b/ui/file_manager/video_player/js/media_controls.js |
| @@ -619,7 +619,7 @@ MediaControls.prototype.attachMedia = function(mediaElement) { |
| /* Copy the user selected volume to the new media element. */ |
| this.savedVolume_ = this.media_.volume = this.volume_.ratio; |
| } |
| - if (this.media_.textTracks.length > 0) { |
| + 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
|
| this.attachTextTrack_(this.media_.textTracks[0]); |
| } else { |
| this.attachTextTrack_(null); |