<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>93131</bug_id>
          
          <creation_ts>2012-08-03 09:33:51 -0700</creation_ts>
          <short_desc>[Mac] Media elements do not fire a suspend event after completely loading the resource</short_desc>
          <delta_ts>2012-08-07 14:33:41 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>93052</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Scherkus">scherkus</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>686837</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Scherkus">scherkus</who>
    <bug_when>2012-08-03 09:33:51 -0700</bug_when>
    <thetext>Check out bug 93052 for a test.

Alternatively just attach event listeners to &apos;progress&apos; and &apos;suspend&apos; 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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>688417</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2012-08-06 14:13:11 -0700</bug_when>
    <thetext>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 &apos;suspend&apos; 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().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>689391</commentid>
    <comment_count>2</comment_count>
    <who name="Andrew Scherkus">scherkus</who>
    <bug_when>2012-08-07 14:33:41 -0700</bug_when>
    <thetext>Good catch! I&apos;m going to fix it + add a test.

*** This bug has been marked as a duplicate of bug 93052 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>