<?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>22251</bug_id>
          
          <creation_ts>2013-06-03 16:30:33 +0000</creation_ts>
          <short_desc>Define better error when no video or audio source is available</short_desc>
          <delta_ts>2014-08-25 07:40:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebRTC Working Group</product>
          <component>Media Capture and Streams</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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>---</target_milestone>
          <dependson>25988</dependson>
          <blocked>22217</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominique Hazael-Massieux">dom</reporter>
          <assigned_to name="Harald Alvestrand">harald</assigned_to>
          <cc>adam.bergkvist</cc>
    
    <cc>annevk</cc>
    
    <cc>harald</cc>
    
    <cc>paul.neave</cc>
    
    <cc>public-media-capture</cc>
    
    <cc>stefan.lk.hakansson</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>88577</commentid>
    <comment_count>0</comment_count>
    <who name="Dominique Hazael-Massieux">dom</who>
    <bug_when>2013-06-03 16:30:33 +0000</bug_when>
    <thetext>If the device has no way to stream live video, the current algorithm sets finalSet to an empty set, asks the user agent to prompt the user on that set.

Thus it&apos;s not clear whether:
* the UA should prompt at all (I guess it could offer to stream a video file in that case)
* whether it ends with &quot;permission denied&quot;, or a stalled algorithm

It would seem maybe more logical to trigger a ContraintNotSatisfied error, although it&apos;s not clear what the name of the constraint should be in that case (maybe the name of the requested media type?).

(handling the absence of a media device differently is odd, since one could always get the same thing via a trivial mandatory constraint, e.g. video : { mandatory : {width: { min:0}}} )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88731</commentid>
    <comment_count>1</comment_count>
    <who name="Stefan Hakansson LK">stefan.lk.hakansson</who>
    <bug_when>2013-06-05 12:38:04 +0000</bug_when>
    <thetext>To me it makes sense to trigger a ConstraintNotSatisfied error with the name of the media type that could not be supplied as name.

I guess that if both audio and video is requested (audio: true and video: true), but none can be delivered, it does not really matter if audio or video is reported as constraintName.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88732</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Neave">paul.neave</who>
    <bug_when>2013-06-05 13:16:29 +0000</bug_when>
    <thetext>I believe Firefox have implemented a non-standard NO_DEVICES_FOUND error for the case when no device for audio/video is available. I prefer this approach as I think a separate error would be better than conflating with the CONSTRAINT_NOT_SATISFIED error, which should only be for cases when a specific mandatory constraint cannot be met.

Firefox also uses a non-standard HARDWARE_UNAVAILABLE error for when a device exists but for some reason cannot be used (such as, it is already in use by another web page/program).

Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91540</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Neave">paul.neave</who>
    <bug_when>2013-08-02 09:10:44 +0000</bug_when>
    <thetext>I recently made a proposal for two new NavigatorUserMediaError error codes on the mailing list: http://lists.w3.org/Archives/Public/public-media-capture/2013Jul/0124.html

They are:

HARDWARE_UNAVAILABLE - A suitable device is connected but a hardware error prevented access (such as an OS/program/webpage lock)

and

NO_DEVICES_FOUND - No suitable devices are connected whatsoever

This matches Firefox&apos;s current implementation, and I would like to see them formerly adopted into the spec.

Also, perhaps all NavigatorUserMediaError error codes should use camelCase instead and inherit from DOMError, as ticket 22216 has requested: https://www.w3.org/Bugs/Public/show_bug.cgi?id=22216</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92029</commentid>
    <comment_count>4</comment_count>
    <who name="Adam Bergkvist">adam.bergkvist</who>
    <bug_when>2013-08-14 08:09:41 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Also, perhaps all NavigatorUserMediaError error codes should use camelCase
&gt; instead and inherit from DOMError, as ticket 22216 has requested:
&gt; https://www.w3.org/Bugs/Public/show_bug.cgi?id=22216

This is fixed and will be in the next release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92408</commentid>
    <comment_count>5</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2013-08-21 11:34:14 +0000</bug_when>
    <thetext>Suggested resolution, now that we inherit from DOMError:

NO_DEVICES_FOUND -&gt; NotFoundError (existing DOMError code)
HARDWARE_UNAVAILABLE -&gt; AbortError (existing DOMError code)
                     -&gt; SourceUnavailable (NEW DOMError code)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92410</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Neave">paul.neave</who>
    <bug_when>2013-08-21 11:37:41 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Suggested resolution, now that we inherit from DOMError:
&gt; 
&gt; NO_DEVICES_FOUND -&gt; NotFoundError (existing DOMError code)
&gt; HARDWARE_UNAVAILABLE -&gt; AbortError (existing DOMError code)
&gt;                      -&gt; SourceUnavailable (NEW DOMError code)

This seems very sensible. Thanks Harald.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92419</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-21 13:47:04 +0000</bug_when>
    <thetext>FWIW, we&apos;re getting rid of DOMError: http://dom.spec.whatwg.org/#domerror</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92422</commentid>
    <comment_count>8</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2013-08-21 14:21:37 +0000</bug_when>
    <thetext>At the moment the comment says:

&quot;DOMError might be nuked in favor of using DOMException exclusively. See Creating your own errors on es-discuss for more details.&quot;

DOMException seems to be numeric codes named with ALL_CAPS_WITH_UNDERSCORES.

Are you going back to that naming style again?

&quot;There are two ways to do this. The deprecated one, and the one that doesn&apos;t work yet.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92424</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-08-21 14:43:54 +0000</bug_when>
    <thetext>DOMException has a name field that returns the new-style name. However, we&apos;re still discussing with TC39 what the best way of error handling throughout the platform would be. (The editor of JavaScript actually favors a fairly minimalistic approach, without much branching on different types of exceptions and without introducing new ones.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102748</commentid>
    <comment_count>10</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-03-21 15:00:20 +0000</bug_when>
    <thetext>Now that we don&apos;t inherit from DOMError any more, since that&apos;s going away, but we still have an error object with a name and a message:

Suggested change of names:

NO_DEVICES_FOUND -&gt; NotFoundError (existing DOMError name)
HARDWARE_UNAVAILABLE -&gt; AbortError (existing DOMError name)
                     -&gt; SourceUnavailable (NEW name)


I&apos;ll create a new tracking error for the whole DOMError -&gt; JS Error issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110517</commentid>
    <comment_count>11</comment_count>
    <who name="Stefan Hakansson LK">stefan.lk.hakansson</who>
    <bug_when>2014-08-25 07:40:22 +0000</bug_when>
    <thetext>FIxed in version http://dev.w3.org/2011/webrtc/editor/archives/20140817/getusermedia.html</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>