Bug 93131
Summary: | [Mac] Media elements do not fire a suspend event after completely loading the resource | ||
---|---|---|---|
Product: | WebKit | Reporter: | Andrew Scherkus <scherkus> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | eric.carlson |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Andrew Scherkus
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Carlson
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
Good catch! I'm going to fix it + add a test.
*** This bug has been marked as a duplicate of bug 93052 ***