Skip to content
  • commit-queue@webkit.org's avatar
    [BlackBerry] Unexpected repeats of short media · 1aee8f68
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=88733
    
    Patch by Max Feil <mfeil@rim.com> on 2012-06-11
    Reviewed by Antonio Gomes.
    
    Source/WebCore:
    
    The m_userDrivenSeekTimer is causing unwanted repeats of short
    media such as sound effects because it is causing the current
    time to not reflect that the media has finished playing.
    This problem only affects media whose duration is close to
    or less than the SeekSubmissionDelay, which is currently
    set to 100ms. My fix is to ignore the userDrivenSeekTimer in
    MediaPlayerPrivate::currentTime() if the duration of the media
    is within twice the SeekSubmissionDelay. Seek drag smoothness
    is a non-issue for such short media.
    
    Test: platform/blackberry/media/short-media-repeats-correctly.html
    
    * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
    (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
    (WebCore):
    (WebCore::MediaPlayerPrivate::currentTime):
    (WebCore::MediaPlayerPrivate::seek):
    (WebCore::MediaPlayerPrivate::userDrivenSeekTimerFired):
    * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
    (MediaPlayerPrivate):
    
    LayoutTests:
    
    Test for problem where short media repeats unintentionally.
    
    * media/content/short.wav: Added.
    * platform/blackberry/media/short-media-repeats-correctly-expected.txt: Added.
    * platform/blackberry/media/short-media-repeats-correctly.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    1aee8f68