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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 263333004: Add timelineOffset() support to WebMediaPlayerAndroid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index c8c8ae454c14feef27ceab641037b8144d3c2d83..6ad72da077aa8c706b3f94d0e9218a1d9c19b5bc 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -397,6 +397,17 @@ double WebMediaPlayerAndroid::duration() const {
return duration_.InSecondsF();
}
+double WebMediaPlayerAndroid::timelineOffset() const {
+ base::Time timeline_offset;
+ if (media_source_delegate_)
+ timeline_offset = media_source_delegate_->GetTimelineOffset();
+
+ if (timeline_offset.is_null())
+ return std::numeric_limits<double>::quiet_NaN();
+
+ return timeline_offset.ToJsTime();
+}
+
double WebMediaPlayerAndroid::currentTime() const {
// If the player is processing a seek, return the seek time.
// Blink may still query us if updatePlaybackState() occurs while seeking.
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698