Bug 93131

Summary: [Mac] Media elements do not fire a suspend event after completely loading the resource
Product: WebKit Reporter: Andrew Scherkus <scherkus>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: eric.carlson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Andrew Scherkus
Reported 2012-08-03 09:33:51 PDT
Check out bug 93052 for a test. Alternatively just attach event listeners to 'progress' and 'suspend' and load a resource over HTTP. As expected, the network state is NETWORK_LOADING and fires progress events. When the last progress event fires that has buffered.end(0) == duration the network state goes back down to NETWORK_IDLE but curiously enough no suspend event is fired. I tested this out on Safari 5.1.7 (Snow Leopard) and WebKit build @ r124543 (Snow Leopard).
Attachments
Eric Carlson
Comment 1 2012-08-06 14:13:11 PDT
As I noted in https://bugs.webkit.org/show_bug.cgi?id=93052, this is caused by a bug in HTMLMediaElement::setNetworkState, so we only fire 'suspend' when the networkState is set to MediaPlayer::Idle, not when it is set to MediaPlayer::Loaded. It looks like we should move the firing of the event into changeNetworkStateFromLoadingToIdle().
Andrew Scherkus
Comment 2 2012-08-07 14:33:41 PDT
Good catch! I'm going to fix it + add a test. *** This bug has been marked as a duplicate of bug 93052 ***
Note You need to log in before you can comment on or make changes to this bug.