Commit 24501f27 authored by yoshiki's avatar yoshiki Committed by Commit bot

Video Player: Support seek on casting

BUG=397393
TEST=manually tested

Review URL: https://codereview.chromium.org/506583002

Cr-Commit-Position: refs/heads/master@{#291859}
parent 751d179a
......@@ -91,7 +91,11 @@ CastVideoElement.prototype = {
}
},
set currentTime(currentTime) {
// 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 object that represents the seekable ranges of the media
* 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_; },
};
},
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment