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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 607493002: Introduce WebMediaPlayer::seekable() to replace maxTimeSeekable() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 70b17b45a3cd8bb61e5e51cae5f61c58b2e6c2eb..3cb8fbc9859bcc0e51a6189e667a263b99fa058e 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -3290,12 +3290,10 @@ PassRefPtrWillBeRawPtr<TimeRanges> HTMLMediaElement::played()
PassRefPtrWillBeRawPtr<TimeRanges> HTMLMediaElement::seekable() const
{
- if (webMediaPlayer()) {
- double maxTimeSeekable = webMediaPlayer()->maxTimeSeekable();
- if (maxTimeSeekable)
- return TimeRanges::create(0, maxTimeSeekable);
- }
- return TimeRanges::create();
+ if (!webMediaPlayer())
+ return TimeRanges::create();
+
+ return TimeRanges::create(webMediaPlayer()->seekable());
}
bool HTMLMediaElement::potentiallyPlaying() const

Powered by Google App Engine
This is Rietveld 408576698