Chromium Code Reviews| Index: ui/file_manager/video_player/js/cast/cast_video_element.js |
| diff --git a/ui/file_manager/video_player/js/cast/cast_video_element.js b/ui/file_manager/video_player/js/cast/cast_video_element.js |
| index 384474f78c595ee5f94a3d775a171edd51fd7695..88de7ae47c4eee154d1b40d060cb62e8af4d8251 100644 |
| --- a/ui/file_manager/video_player/js/cast/cast_video_element.js |
| +++ b/ui/file_manager/video_player/js/cast/cast_video_element.js |
| @@ -91,7 +91,11 @@ CastVideoElement.prototype = { |
| } |
| }, |
| set currentTime(currentTime) { |
|
fukino
2014/08/26 03:45:06
nit: Please provide a JSDoc comment.
yoshiki
2014/08/26 04:25:23
This is a setter so we don't need JSDoc.
|
| - // TODO(yoshiki): Support seek. |
| + var seekRequest = new chrome.cast.media.SeekRequest(); |
| + seekRequest.currentTime = currentTime; |
| + this.castMedia_.seek(seekRequest, |
| + function() {}, |
| + this.onCastCommandError_.wrap(this)); |
| }, |
| /** |
| @@ -119,12 +123,16 @@ CastVideoElement.prototype = { |
| }, |
| /** |
| - * If this video is seekable or not. |
| - * @type {boolean} |
| + * TimeRange objects that represents the seekable ranges of the media |
|
fukino
2014/08/26 03:45:06
super nit: s/TimeRange objects/TimeRanges object/
yoshiki
2014/08/26 04:25:39
Done.
|
| + * resource. |
| + * @type {TimeRanges} |
| */ |
| get seekable() { |
| - // TODO(yoshiki): Support seek. |
| - return false; |
| + return { |
| + length: 1, |
| + start: function(index) { return 0; }, |
| + end: function(index) { return this.currentMediaDuration_; }, |
| + }; |
| }, |
| /** |