HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime...
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 17:30:38 +0000 (17:30 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Mar 2015 17:30:38 +0000 (17:30 +0000)
commit06ae4d91330ede1dbe6235377f5aa389d717529e
tree09e8c40047c4d19fcb8b7ff6c714cd6ecf10d129
parent39f0896a29e4d15ce5290b571bd9027033c18b82
HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
https://bugs.webkit.org/show_bug.cgi?id=143132

Reviewed by Eric Carlson.

When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
event and continue playback. However, if a media engine updates the ready state before its
seek operation actually completes, the currentTime it returns may still be the time before
the seek.

Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
false before firing the 'seeked' event.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182069 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp