<?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>27649</bug_id>
          
          <creation_ts>2014-12-18 03:22:04 +0000</creation_ts>
          <short_desc>[MSE] Confused when set MediaSource.duration to NaN throwing an InvalidAccessError exception</short_desc>
          <delta_ts>2015-01-09 19:29:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Media Source Extensions</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>CR</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Qin Jiajia">jiajia.qin</reporter>
          <assigned_to name="Aaron Colwell">acolwell</assigned_to>
          <cc>acolwell</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116453</commentid>
    <comment_count>0</comment_count>
    <who name="Qin Jiajia">jiajia.qin</who>
    <bug_when>2014-12-18 03:22:04 +0000</bug_when>
    <thetext>In https://w3c.github.io/media-source/#widl-MediaSource-duration, on setting step 1: If the value being set is negative or NaN then throw an InvalidAccessError exception. However, in https://w3c.github.io/media-source/#mediasource-detach, step 2: Set the duration attribute to NaN. The two steps are conflicting. I think when set duration value to NaN, it shouldn&apos;t throw exception.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116512</commentid>
    <comment_count>1</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2014-12-18 18:23:46 +0000</bug_when>
    <thetext>(In reply to Qin Jiajia from comment #0)
&gt; In https://w3c.github.io/media-source/#widl-MediaSource-duration, on setting
&gt; step 1: If the value being set is negative or NaN then throw an
&gt; InvalidAccessError exception. However, in
&gt; https://w3c.github.io/media-source/#mediasource-detach, step 2: Set the
&gt; duration attribute to NaN. The two steps are conflicting. I think when set
&gt; duration value to NaN, it shouldn&apos;t throw exception.

The former is called from JavaScript. The latter is a step that is executed internal to the UA so the setter algorithm isn&apos;t run. 

This language is similar to how other attribute values are updated so I don&apos;t really understand why there is confusion. For example, the latter doesn&apos;t say to &quot;run the duration setter algorithm&quot; so I don&apos;t think the reader should assume that the exception checking and such in that algorithm should apply.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116513</commentid>
    <comment_count>2</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2014-12-18 18:34:21 +0000</bug_when>
    <thetext>(In reply to Aaron Colwell from comment #1)
&gt; (In reply to Qin Jiajia from comment #0)
&gt; &gt; In https://w3c.github.io/media-source/#widl-MediaSource-duration, on setting
&gt; &gt; step 1: If the value being set is negative or NaN then throw an
&gt; &gt; InvalidAccessError exception. However, in
&gt; &gt; https://w3c.github.io/media-source/#mediasource-detach, step 2: Set the
&gt; &gt; duration attribute to NaN. The two steps are conflicting. I think when set
&gt; &gt; duration value to NaN, it shouldn&apos;t throw exception.
&gt; 
&gt; The former is called from JavaScript. The latter is a step that is executed
&gt; internal to the UA so the setter algorithm isn&apos;t run. 
&gt; 
&gt; This language is similar to how other attribute values are updated so I
&gt; don&apos;t really understand why there is confusion. For example, the latter
&gt; doesn&apos;t say to &quot;run the duration setter algorithm&quot; so I don&apos;t think the
&gt; reader should assume that the exception checking and such in that algorithm
&gt; should apply.

If you think it would make it clearer, I could change the text in the detach algorithm to say &quot;Update duration to NaN&quot; so that it is similar to the language in step 3 of the &quot;duration change algorithm&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116541</commentid>
    <comment_count>3</comment_count>
    <who name="Qin Jiajia">jiajia.qin</who>
    <bug_when>2014-12-19 02:28:21 +0000</bug_when>
    <thetext>(In reply to Aaron Colwell from comment #2)
&gt; (In reply to Aaron Colwell from comment #1)
&gt; &gt; (In reply to Qin Jiajia from comment #0)
&gt; &gt; &gt; In https://w3c.github.io/media-source/#widl-MediaSource-duration, on setting
&gt; &gt; &gt; step 1: If the value being set is negative or NaN then throw an
&gt; &gt; &gt; InvalidAccessError exception. However, in
&gt; &gt; &gt; https://w3c.github.io/media-source/#mediasource-detach, step 2: Set the
&gt; &gt; &gt; duration attribute to NaN. The two steps are conflicting. I think when set
&gt; &gt; &gt; duration value to NaN, it shouldn&apos;t throw exception.
&gt; &gt; 
&gt; &gt; The former is called from JavaScript. The latter is a step that is executed
&gt; &gt; internal to the UA so the setter algorithm isn&apos;t run. 
&gt; &gt; 
&gt; &gt; This language is similar to how other attribute values are updated so I
&gt; &gt; don&apos;t really understand why there is confusion. For example, the latter
&gt; &gt; doesn&apos;t say to &quot;run the duration setter algorithm&quot; so I don&apos;t think the
&gt; &gt; reader should assume that the exception checking and such in that algorithm
&gt; &gt; should apply.
&gt; 
&gt; If you think it would make it clearer, I could change the text in the detach
&gt; algorithm to say &quot;Update duration to NaN&quot; so that it is similar to the
&gt; language in step 3 of the &quot;duration change algorithm&quot;.

Got it. It&apos;s better to say &quot;Update duration to NaN&quot;. Thanks :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116970</commentid>
    <comment_count>4</comment_count>
    <who name="Aaron Colwell">acolwell</who>
    <bug_when>2015-01-09 19:29:38 +0000</bug_when>
    <thetext>Change committed...
https://github.com/w3c/media-source/commit/d41abbdd4d10aa7bb552a86518c734e30449d0b2</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>