Bug 32161

Summary: HTML 5 Audio "progress" event is sending undefined values in webkit nightly
Product: WebKit Reporter: Joseph Huckaby <jhuckaby>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: eric.carlson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.6   
URL: http://bowser.macminicolo.net/~jhuckaby/bugs/snow-leopard-audio-progress/

Description Joseph Huckaby 2009-12-04 08:47:53 PST
The HTML 5 Audio "progress" event is supposed to send the number of bytes loaded, and the number of total bytes in the audio track.  This works perfectly in production Safari 4.0.4, but in the webkit nightly build (6531.21.10, r51669), the progress event sends back "undefined" values.

Test Page:
http://bowser.macminicolo.net/~jhuckaby/bugs/snow-leopard-audio-progress/

HTMLMediaElement Reference Documentation:
http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariJSRef/HTMLMediaElement/HTMLMediaElement.html

Source code of HTMLMediaElement.cpp:
http://www.opensource.apple.com/source/WebCore/WebCore-5525.28.4/html/HTMLMediaElement.cpp

void HTMLMediaElement::initAndDispatchProgressEvent(const AtomicString& eventName)
{
    bool totalKnown = m_player && m_player->totalBytesKnown();
    unsigned loaded = m_player ? m_player->bytesLoaded() : 0;
    unsigned total = m_player ? m_player->totalBytes() : 0;
    dispatchProgressEvent(eventName, totalKnown, loaded, total);
    if (renderer())
        renderer()->updateFromElement();
}
Comment 1 Mark Rowe (bdash) 2009-12-04 15:13:56 PST
Per bug 30513 this appears to be correct behavior.
Comment 2 Eric Carlson 2009-12-04 15:18:38 PST
Correct, progress events were removed from the HTML5 spec in r4133. See http://html5.org/tools/web-apps-tracker?from=4132&to=4133