| Index: webkit/media/android/webmediaplayer_android.cc
|
| diff --git a/webkit/media/android/webmediaplayer_android.cc b/webkit/media/android/webmediaplayer_android.cc
|
| index 5b00e5dbd3c31626a8eb0ff1563c1f33463dccee..fcddda0b4ea03f69edf505df415c54b3c35ca129 100644
|
| --- a/webkit/media/android/webmediaplayer_android.cc
|
| +++ b/webkit/media/android/webmediaplayer_android.cc
|
| @@ -114,6 +114,10 @@ void WebMediaPlayerAndroid::pause() {
|
| is_playing_ = false;
|
| }
|
|
|
| +void WebMediaPlayerAndroid::seekFloat(float seconds) {
|
| + seek(seconds);
|
| +}
|
| +
|
| void WebMediaPlayerAndroid::seek(float seconds) {
|
| pending_seek_ = seconds;
|
| seeking_ = true;
|
| @@ -129,15 +133,27 @@ bool WebMediaPlayerAndroid::supportsSave() const {
|
| return false;
|
| }
|
|
|
| +void WebMediaPlayerAndroid::setEndTimeFloat(float seconds) {
|
| + setEndTime(seconds);
|
| +}
|
| +
|
| void WebMediaPlayerAndroid::setEndTime(float seconds) {
|
| // Deprecated.
|
| // TODO(qinmin): Remove this from WebKit::WebMediaPlayer as it is never used.
|
| }
|
|
|
| +void WebMediaPlayerAndroid::setRateFloat(float rate) {
|
| + setRate(rate);
|
| +}
|
| +
|
| void WebMediaPlayerAndroid::setRate(float rate) {
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| +void WebMediaPlayerAndroid::setVolumeFloat(float volume) {
|
| + setVolume(volume);
|
| +}
|
| +
|
| void WebMediaPlayerAndroid::setVolume(float volume) {
|
| NOTIMPLEMENTED();
|
| }
|
| @@ -186,10 +202,18 @@ bool WebMediaPlayerAndroid::seeking() const {
|
| return seeking_;
|
| }
|
|
|
| +float WebMediaPlayerAndroid::durationFloat() const {
|
| + return duration();
|
| +}
|
| +
|
| float WebMediaPlayerAndroid::duration() const {
|
| return static_cast<float>(duration_.InSecondsF());
|
| }
|
|
|
| +float WebMediaPlayerAndroid::currentTimeFloat() const {
|
| + return currentTime();
|
| +}
|
| +
|
| float WebMediaPlayerAndroid::currentTime() const {
|
| // If the player is pending for a seek, return the seek time.
|
| if (seeking())
|
| @@ -220,6 +244,10 @@ const WebTimeRanges& WebMediaPlayerAndroid::buffered() {
|
| return buffered_;
|
| }
|
|
|
| +float WebMediaPlayerAndroid::maxTimeSeekableFloat() const {
|
| + return maxTimeSeekable();
|
| +}
|
| +
|
| float WebMediaPlayerAndroid::maxTimeSeekable() const {
|
| // TODO(hclam): If this stream is not seekable this should return 0.
|
| return duration();
|
| @@ -260,6 +288,10 @@ WebMediaPlayer::MovieLoadType WebMediaPlayerAndroid::movieLoadType() const {
|
| return WebMediaPlayer::MovieLoadTypeUnknown;
|
| }
|
|
|
| +float WebMediaPlayerAndroid::mediaTimeForTimeValueFloat(float timeValue) const {
|
| + return mediaTimeForTimeValue(timeValue);
|
| +}
|
| +
|
| float WebMediaPlayerAndroid::mediaTimeForTimeValue(float timeValue) const {
|
| return ConvertSecondsToTimestamp(timeValue).InSecondsF();
|
| }
|
|
|