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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24955</bug_id>
          
          <creation_ts>2014-03-06 09:05:50 +0000</creation_ts>
          <short_desc>Does seeking to the end trigger the loop/ended/pause steps?</short_desc>
          <delta_ts>2014-04-14 21:53:28 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#playing-the-media-resource</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>101971</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-03-06 09:05:50 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#playing-the-media-resource
Complete: http://www.whatwg.org/c#playing-the-media-resource
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Does seeking to the end trigger the loop/ended/pause steps?

Posted from: 58.187.26.12
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36 OPR/20.0.1387.59 (Edition Next)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101972</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-06 09:12:34 +0000</bug_when>
    <thetext>I was going to write some test cases for this, but don&apos;t know if the spec says what it should right now.

If the media element is paused and one sets currentTime to duration, does that trigger &quot;When the current playback position reaches the end of the media resource when the direction of playback is forwards&quot;? AFAICT it does.

I&apos;m not certain this edge case (involving loop) matter but want to make sure it&apos;s intentional and not an oversight.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102515</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-17 22:03:40 +0000</bug_when>
    <thetext>Spec seems unambiguous here, but I&apos;ve added text to make it clear that it&apos;s not an oversight. Quick testing shows Safari and Chrome on Mac do this correctly today.

Let me know if there&apos;s anything else that needs doing here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102516</commentid>
    <comment_count>3</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-03-17 22:03:46 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8551.
Check-in comment: Try to clarify looping rules
http://html5.org/tools/web-apps-tracker?from=8550&amp;to=8551</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102529</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-18 03:03:16 +0000</bug_when>
    <thetext>There is actually one more thing that I&apos;m unsure of now that I tried to write the test again.

It&apos;s not really clear when the &quot;reaches the end of the media resource when the direction of playback is forwards&quot; step can run. If you seek to duration without loop, you should expect the events &quot;seeking, timeupdate, seeked&quot;. With loop, there will be a second seek with these same events, but when? Is it when the seeking algorithm awaits a stable state, or does it wait until the first seek is finished?

In other words, is the event order &quot;seeking, timeupdate, seeked, seeking, timeupdate, seeked&quot;, just &quot;seeking, timeupdate, seeked&quot; or perhaps &quot;seeking, timeupdate, seeking, timeupdate, seeked&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102593</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-03-18 18:31:17 +0000</bug_when>
    <thetext>Wouldn&apos;t it just happen synchronously in seek&apos;s step 11? Step 1 aborts the previous instance, so it would presumably go seeking, seeking, timeupdate, seeked.

I can add a note in step 11 that points out that this triggers the other condition synchronously, if you like.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102616</commentid>
    <comment_count>6</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-03-19 04:12:37 +0000</bug_when>
    <thetext>Now that you point it out it&apos;s quite clear, since &quot;current playback position&quot; is used in both definitions. A note at that point wouldn&apos;t hurt though, since I doubt this is the event order in existing implementations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103838</commentid>
    <comment_count>7</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-04-14 21:53:28 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r8575.
Check-in comment: Clarify the interaction of looping and seeking.
http://html5.org/tools/web-apps-tracker?from=8574&amp;to=8575</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>