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

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

Issue 539103002: Seeking media fragment URI before loadeddata event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@HAVE_NOTHING
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
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 9c001f5f1ccb05d5aecf15b6d685fd7ed57d5885..c528dc755f113055f5eb9dd493c2680d05d4a064 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -355,6 +355,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
, m_tracksAreReady(true)
, m_haveVisibleTextTrack(false)
, m_processingPreferenceChange(false)
+ , m_jumped(false)
#if ENABLE(OILPAN)
, m_isFinalizing(false)
, m_closeMediaSourceWhenFinalizing(false)
@@ -1824,8 +1825,10 @@ void HTMLMediaElement::setReadyState(ReadyState state)
scheduleEvent(EventTypeNames::resize);
scheduleEvent(EventTypeNames::loadedmetadata);
+ m_jumped = false;
if (m_defaultPlaybackStartPosition > 0) {
seek(m_defaultPlaybackStartPosition);
+ m_jumped = true;
m_defaultPlaybackStartPosition = 0;
}
@@ -1842,7 +1845,8 @@ void HTMLMediaElement::setReadyState(ReadyState state)
shouldUpdateDisplayState = true;
scheduleEvent(EventTypeNames::loadeddata);
setShouldDelayLoadEvent(false);
- applyMediaFragmentURI();
+ if (!m_jumped)
+ applyMediaFragmentURI();
amogh.bihani 2014/09/04 13:44:18 Could you help me understand why this is here? I m
philipj_slow 2014/09/04 13:46:45 Sorry, I didn't see this comment at first. You're
}
bool isPotentiallyPlaying = potentiallyPlaying();
@@ -3898,10 +3902,13 @@ void HTMLMediaElement::prepareMediaFragmentURI()
void HTMLMediaElement::applyMediaFragmentURI()
{
+ ASSERT(!m_jumped);
+
if (m_fragmentStartTime != MediaPlayer::invalidTime()) {
m_sentEndEvent = false;
UseCounter::count(document(), UseCounter::HTMLMediaElementSeekToFragmentStart);
seek(m_fragmentStartTime);
+ m_jumped = true;
}
}
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698