Chromium Code Reviews

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

Issue 204803002: Make scrubbing a MediaControls-internal concept (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 22612f5dd6175836b9271abc2ce8af76b83d82fb..ad6e1525e85db540a3e68770d3802cb8a2ef44b6 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -2099,33 +2099,6 @@ void HTMLMediaElement::setMuted(bool muted)
scheduleEvent(EventTypeNames::volumechange);
}
-void HTMLMediaElement::beginScrubbing()
-{
- WTF_LOG(Media, "HTMLMediaElement::beginScrubbing - paused() is %s", boolString(paused()));
-
- if (!paused()) {
- if (ended()) {
- // Because a media element stays in non-paused state when it reaches end, playback resumes
- // when the slider is dragged from the end to another position unless we pause first. Do
- // a "hard pause" so an event is generated, since we want to stay paused after scrubbing finishes.
- pause();
- } else {
- // Not at the end but we still want to pause playback so the media engine doesn't try to
- // continue playing during scrubbing. Pause without generating an event as we will
- // unpause after scrubbing finishes.
- setPausedInternal(true);
- }
- }
-}
-
-void HTMLMediaElement::endScrubbing()
-{
- WTF_LOG(Media, "HTMLMediaElement::endScrubbing - m_pausedInternal is %s", boolString(m_pausedInternal));
-
- if (m_pausedInternal)
- setPausedInternal(false);
-}
-
// The spec says to fire periodic timeupdate events (those sent while playing) every
// "15 to 250ms", we choose the slowest frequency
static const double maxTimeupdateEventFrequency = 0.25;

Powered by Google App Engine