<?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>178115</bug_id>
          
          <creation_ts>2017-10-09 20:30:54 -0700</creation_ts>
          <short_desc>Support ideal constraints for getUserMedia</short_desc>
          <delta_ts>2020-07-29 05:52:43 -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>WebRTC</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="youenn fablet">youennf</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>daginge</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>michael.heuberger</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1358629</commentid>
    <comment_count>0</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2017-10-09 20:30:54 -0700</bug_when>
    <thetext>According https://bugs.webkit.org/show_bug.cgi?id=178109, WebKit might not always handle properly &apos;ideal&apos; constraints.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1567182</commentid>
    <comment_count>1</comment_count>
    <who name="Dag-Inge Aas">daginge</who>
    <bug_when>2019-09-02 04:27:38 -0700</bug_when>
    <thetext>Just wanted to bump this. All the other browsers support ideal, which makes switching camera effortless for us, as our users frequently change from laptop mode to docked mode (with external camera attached). We could pick up the error here and re-run getUserMedia with the default camera, but it would have to be a workaround just for Safari, so I would rather prefer spec-compliance here.

Is there any timeline for implementing the ideal constraint?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1666405</commentid>
    <comment_count>2</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-06-26 05:59:37 -0700</bug_when>
    <thetext>Since we now have resizing being done, I would hope ideal constraints are correctly supported now.
Daginge, do you still have issues with ideal constraints or can we close that issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1666437</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-06-26 07:51:25 -0700</bug_when>
    <thetext>Actually, https://bugs.webkit.org/show_bug.cgi?id=210932 might be one issue along those lines.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1675951</commentid>
    <comment_count>4</comment_count>
    <who name="Dag-Inge Aas">daginge</who>
    <bug_when>2020-07-29 04:52:35 -0700</bug_when>
    <thetext>As far as I can see, ideal constraints when selecting getUserMedia works as expected now. If I have selected a camera by deviceId, and it doesn&apos;t match, I get the default device available.

Kinda annoying that deviceIds are not persistent across sessions, so if the user refreshes, you have to select the device you want again in that session. Usually we would store the preferred deviceId in localStorage and attempt to use that next session.

Separate bug I guess? There are ofc. some privacy concerns here also.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1675974</commentid>
    <comment_count>5</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-07-29 05:51:29 -0700</bug_when>
    <thetext>&gt; Kinda annoying that deviceIds are not persistent across sessions, so if the
&gt; user refreshes, you have to select the device you want again in that
&gt; session. Usually we would store the preferred deviceId in localStorage and
&gt; attempt to use that next session.

This should work as you expect, with IDB instead of localStorage if possible :)
Not sure exactly why this is not working for you. third party iframe?
Might be worth another bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1675975</commentid>
    <comment_count>6</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-07-29 05:51:55 -0700</bug_when>
    <thetext>Closing as configuration changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1675977</commentid>
    <comment_count>7</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2020-07-29 05:52:43 -0700</bug_when>
    <thetext>I think there might still be some corner cases with ideal constraints but we can treat them as follow-up bugs if it becomes a practical issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>