{"action":"created","comment":{"url":"https://api.github.com/repos/w3c/mediacapture-main/pulls/comments/24395633","id":24395633,"diff_hunk":"@@ -3386,31 +3386,69 @@\n \n       <p>The application can select the (range of) values it wants for an\n       object's Capabilities by means of basic and/or advanced ConstraintSets\n-      and the <code>applyConstraints()</code> method. A ConstraintSet consists\n+      and the <code>applyConstraints()</code> method.</p>\n+\n+      <p>A ConstraintSet consists\n       of the names of one or more properties of the object plus the desired\n       value (or a range of desired values) for each property. Each of those\n-      property/value pairs can be considered to be an individual constraint.\n-      For example, the application may set a ConstraintSet containing two\n+      property/value pairs defines an individual constraint.</p>\n+\n+      <p>For example, the application may set a ConstraintSet containing two\n       constraints, the first stating that the framerate of a camera be between\n       30 and 40 frames per second (a range) and the second that the camera\n-      should be facing the user (a specific value). How the individual\n+      should be facing the user (a specific value).</p>\n+\n+      <p>How the individual\n       constraints interact depends on whether and how they are given in the\n       basic Constraint structure, which is a ConstraintSet with an additional\n-      'advanced' property, or whether they are in a ConstraintSet in the\n-      advanced list. The behavior is as follows: all 'min', 'max', and 'exact'\n-      constraints in the basic Constraint structure are together treated as\n-      the 'required' set, and if it is not possible to satisfy simultaneously\n-      all of those individual constraints for the indicated property names,\n-      the User Agent MUST reject the returned promise. Otherwise, it must\n-      apply the required constraints. Next, it will consider any\n-      ConstraintSets given in the 'advanced' list, in the order in which they\n+      <code>advanced</code> property, or whether they are in a ConstraintSet in the\n+      advanced list.</p>\n+\n+      <p>A constraint associates a given property with 4 values using\n+        the <code id=\"readConstraint\">ReadConstraint</code> algorithm:\n+        for a constraint with a property <var>p</var> associated to\n+        the value <var>v</var>:</p>\n+      <ol>\n+        <li>let <var>min</var>, <var>max</var>, <var>exact</var>\n+        and <var>ideal</var> be initially undefined values;</li>\n+        <li>unless set otherwise, let <var>plainAsIdeal</var> be <code>true</code></li>\n+        <li>if <var>v</var> is an object, set <var>min</var>\n+        to <code><var>v</var>.min</code>, <var>max</var>\n+        to <code><var>v</var>.max</code>, <var>exact</var>\n+        to <code><var>v</var>.exact</code>, <var>ideal</var>\n+        to <code><var>v</var>.ideal</code>;</li>\n+        <li>if <var>v</var> is a string or a number:<ul>\n+            <li>if <var>plainAsIdeal</var> is <code>true</code>,\n+            set <var>ideal</var> to <var>v</var>;</li>\n+            <li>otherwise, set <var>exact</var> to <var>v</var>.</li>\n+        </ul></li>\n+        <li>return <var>min</var>, <var>max</var>, <var>exact</var>\n+        and <var>ideal</var></li>\n+      </ol>\n+\n+      <p>The behavior is as follows:</p>\n+      <ol>\n+        <li>all <var>min</var>, <var>max</var>, and <var>exact</var>\n+      values in a constraint are together treated as\n+      the <em>required</em> set</li>\n+        <li>if it is not possible to satisfy simultaneously\n+          all of those individual constraints for the indicated property names,\n+          the User Agent MUST reject the returned promise.</li>\n+        <li>Otherwise, it must\n+      apply the required constraints.","path":"getusermedia.html","position":65,"original_position":65,"commit_id":"2656f1e535a626accc2e1aa96d3f48f12babf47f","original_commit_id":"2656f1e535a626accc2e1aa96d3f48f12babf47f","user":{"login":"alvestrand","id":480893,"avatar_url":"https://avatars.githubusercontent.com/u/480893?v=3","gravatar_id":"","url":"https://api.github.com/users/alvestrand","html_url":"https://github.com/alvestrand","followers_url":"https://api.github.com/users/alvestrand/followers","following_url":"https://api.github.com/users/alvestrand/following{/other_user}","gists_url":"https://api.github.com/users/alvestrand/gists{/gist_id}","starred_url":"https://api.github.com/users/alvestrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvestrand/subscriptions","organizations_url":"https://api.github.com/users/alvestrand/orgs","repos_url":"https://api.github.com/users/alvestrand/repos","events_url":"https://api.github.com/users/alvestrand/events{/privacy}","received_events_url":"https://api.github.com/users/alvestrand/received_events","type":"User","site_admin":false},"body":"I think this bullet should be removed. Applying the constraints comes much later.","created_at":"2015-02-10T08:27:49Z","updated_at":"2015-02-10T08:27:49Z","html_url":"https://github.com/w3c/mediacapture-main/pull/132#discussion_r24395633","pull_request_url":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132","_links":{"self":{"href":"https://api.github.com/repos/w3c/mediacapture-main/pulls/comments/24395633"},"html":{"href":"https://github.com/w3c/mediacapture-main/pull/132#discussion_r24395633"},"pull_request":{"href":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132"}}},"pull_request":{"url":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132","id":28909238,"html_url":"https://github.com/w3c/mediacapture-main/pull/132","diff_url":"https://github.com/w3c/mediacapture-main/pull/132.diff","patch_url":"https://github.com/w3c/mediacapture-main/pull/132.patch","issue_url":"https://api.github.com/repos/w3c/mediacapture-main/issues/132","number":132,"state":"open","locked":false,"title":"clarify how a constraint is read","user":{"login":"dontcallmedom","id":216410,"avatar_url":"https://avatars.githubusercontent.com/u/216410?v=3","gravatar_id":"","url":"https://api.github.com/users/dontcallmedom","html_url":"https://github.com/dontcallmedom","followers_url":"https://api.github.com/users/dontcallmedom/followers","following_url":"https://api.github.com/users/dontcallmedom/following{/other_user}","gists_url":"https://api.github.com/users/dontcallmedom/gists{/gist_id}","starred_url":"https://api.github.com/users/dontcallmedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dontcallmedom/subscriptions","organizations_url":"https://api.github.com/users/dontcallmedom/orgs","repos_url":"https://api.github.com/users/dontcallmedom/repos","events_url":"https://api.github.com/users/dontcallmedom/events{/privacy}","received_events_url":"https://api.github.com/users/dontcallmedom/received_events","type":"User","site_admin":false},"body":"* split up big block of text\r\n* add \"ReadConstraint\" algorithm\r\n* distinguish behavior in normal constraint vs advanced (cf https://github.com/w3c/mediacapture-main/issues/128)\r\n* remove duplicate note about unknown properties","created_at":"2015-02-09T10:22:36Z","updated_at":"2015-02-10T08:27:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6138a0c7fa204058572be75b7c7d63b7f227d3bf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132/commits","review_comments_url":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132/comments","review_comment_url":"https://api.github.com/repos/w3c/mediacapture-main/pulls/comments/{number}","comments_url":"https://api.github.com/repos/w3c/mediacapture-main/issues/132/comments","statuses_url":"https://api.github.com/repos/w3c/mediacapture-main/statuses/2656f1e535a626accc2e1aa96d3f48f12babf47f","head":{"label":"dontcallmedom:plainAsExact","ref":"plainAsExact","sha":"2656f1e535a626accc2e1aa96d3f48f12babf47f","user":{"login":"dontcallmedom","id":216410,"avatar_url":"https://avatars.githubusercontent.com/u/216410?v=3","gravatar_id":"","url":"https://api.github.com/users/dontcallmedom","html_url":"https://github.com/dontcallmedom","followers_url":"https://api.github.com/users/dontcallmedom/followers","following_url":"https://api.github.com/users/dontcallmedom/following{/other_user}","gists_url":"https://api.github.com/users/dontcallmedom/gists{/gist_id}","starred_url":"https://api.github.com/users/dontcallmedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dontcallmedom/subscriptions","organizations_url":"https://api.github.com/users/dontcallmedom/orgs","repos_url":"https://api.github.com/users/dontcallmedom/repos","events_url":"https://api.github.com/users/dontcallmedom/events{/privacy}","received_events_url":"https://api.github.com/users/dontcallmedom/received_events","type":"User","site_admin":false},"repo":{"id":23417856,"name":"mediacapture-main","full_name":"dontcallmedom/mediacapture-main","owner":{"login":"dontcallmedom","id":216410,"avatar_url":"https://avatars.githubusercontent.com/u/216410?v=3","gravatar_id":"","url":"https://api.github.com/users/dontcallmedom","html_url":"https://github.com/dontcallmedom","followers_url":"https://api.github.com/users/dontcallmedom/followers","following_url":"https://api.github.com/users/dontcallmedom/following{/other_user}","gists_url":"https://api.github.com/users/dontcallmedom/gists{/gist_id}","starred_url":"https://api.github.com/users/dontcallmedom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dontcallmedom/subscriptions","organizations_url":"https://api.github.com/users/dontcallmedom/orgs","repos_url":"https://api.github.com/users/dontcallmedom/repos","events_url":"https://api.github.com/users/dontcallmedom/events{/privacy}","received_events_url":"https://api.github.com/users/dontcallmedom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dontcallmedom/mediacapture-main","description":"Media Capture and Streams specification (aka getUserMedia)","fork":true,"url":"https://api.github.com/repos/dontcallmedom/mediacapture-main","forks_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/forks","keys_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/teams","hooks_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/hooks","issue_events_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/issues/events{/number}","events_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/events","assignees_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/assignees{/user}","branches_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/branches{/branch}","tags_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/tags","blobs_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/git/refs{/sha}","trees_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/statuses/{sha}","languages_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/languages","stargazers_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/stargazers","contributors_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/contributors","subscribers_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/subscribers","subscription_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/subscription","commits_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/commits{/sha}","git_commits_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/git/commits{/sha}","comments_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/comments{/number}","issue_comment_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/issues/comments/{number}","contents_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/contents/{+path}","compare_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/merges","archive_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/downloads","issues_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/issues{/number}","pulls_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/pulls{/number}","milestones_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/milestones{/number}","notifications_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/labels{/name}","releases_url":"https://api.github.com/repos/dontcallmedom/mediacapture-main/releases{/id}","created_at":"2014-08-28T06:32:10Z","updated_at":"2014-08-27T11:14:55Z","pushed_at":"2015-02-09T11:12:24Z","git_url":"git://github.com/dontcallmedom/mediacapture-main.git","ssh_url":"git@github.com:dontcallmedom/mediacapture-main.git","clone_url":"https://github.com/dontcallmedom/mediacapture-main.git","svn_url":"https://github.com/dontcallmedom/mediacapture-main","homepage":null,"size":14926,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"w3c:master","ref":"master","sha":"e7f4b58366ed50430c609431a380c4775ac2f334","user":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"repo":{"id":23146519,"name":"mediacapture-main","full_name":"w3c/mediacapture-main","owner":{"login":"w3c","id":379216,"avatar_url":"https://avatars.githubusercontent.com/u/379216?v=3","gravatar_id":"","url":"https://api.github.com/users/w3c","html_url":"https://github.com/w3c","followers_url":"https://api.github.com/users/w3c/followers","following_url":"https://api.github.com/users/w3c/following{/other_user}","gists_url":"https://api.github.com/users/w3c/gists{/gist_id}","starred_url":"https://api.github.com/users/w3c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w3c/subscriptions","organizations_url":"https://api.github.com/users/w3c/orgs","repos_url":"https://api.github.com/users/w3c/repos","events_url":"https://api.github.com/users/w3c/events{/privacy}","received_events_url":"https://api.github.com/users/w3c/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/w3c/mediacapture-main","description":"Media Capture and Streams specification (aka getUserMedia)","fork":false,"url":"https://api.github.com/repos/w3c/mediacapture-main","forks_url":"https://api.github.com/repos/w3c/mediacapture-main/forks","keys_url":"https://api.github.com/repos/w3c/mediacapture-main/keys{/key_id}","collaborators_url":"https://api.github.com/repos/w3c/mediacapture-main/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/w3c/mediacapture-main/teams","hooks_url":"https://api.github.com/repos/w3c/mediacapture-main/hooks","issue_events_url":"https://api.github.com/repos/w3c/mediacapture-main/issues/events{/number}","events_url":"https://api.github.com/repos/w3c/mediacapture-main/events","assignees_url":"https://api.github.com/repos/w3c/mediacapture-main/assignees{/user}","branches_url":"https://api.github.com/repos/w3c/mediacapture-main/branches{/branch}","tags_url":"https://api.github.com/repos/w3c/mediacapture-main/tags","blobs_url":"https://api.github.com/repos/w3c/mediacapture-main/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/w3c/mediacapture-main/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/w3c/mediacapture-main/git/refs{/sha}","trees_url":"https://api.github.com/repos/w3c/mediacapture-main/git/trees{/sha}","statuses_url":"https://api.github.com/repos/w3c/mediacapture-main/statuses/{sha}","languages_url":"https://api.github.com/repos/w3c/mediacapture-main/languages","stargazers_url":"https://api.github.com/repos/w3c/mediacapture-main/stargazers","contributors_url":"https://api.github.com/repos/w3c/mediacapture-main/contributors","subscribers_url":"https://api.github.com/repos/w3c/mediacapture-main/subscribers","subscription_url":"https://api.github.com/repos/w3c/mediacapture-main/subscription","commits_url":"https://api.github.com/repos/w3c/mediacapture-main/commits{/sha}","git_commits_url":"https://api.github.com/repos/w3c/mediacapture-main/git/commits{/sha}","comments_url":"https://api.github.com/repos/w3c/mediacapture-main/comments{/number}","issue_comment_url":"https://api.github.com/repos/w3c/mediacapture-main/issues/comments/{number}","contents_url":"https://api.github.com/repos/w3c/mediacapture-main/contents/{+path}","compare_url":"https://api.github.com/repos/w3c/mediacapture-main/compare/{base}...{head}","merges_url":"https://api.github.com/repos/w3c/mediacapture-main/merges","archive_url":"https://api.github.com/repos/w3c/mediacapture-main/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/w3c/mediacapture-main/downloads","issues_url":"https://api.github.com/repos/w3c/mediacapture-main/issues{/number}","pulls_url":"https://api.github.com/repos/w3c/mediacapture-main/pulls{/number}","milestones_url":"https://api.github.com/repos/w3c/mediacapture-main/milestones{/number}","notifications_url":"https://api.github.com/repos/w3c/mediacapture-main/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/w3c/mediacapture-main/labels{/name}","releases_url":"https://api.github.com/repos/w3c/mediacapture-main/releases{/id}","created_at":"2014-08-20T11:37:16Z","updated_at":"2015-02-10T01:05:12Z","pushed_at":"2015-02-10T01:05:12Z","git_url":"git://github.com/w3c/mediacapture-main.git","ssh_url":"git@github.com:w3c/mediacapture-main.git","clone_url":"https://github.com/w3c/mediacapture-main.git","svn_url":"https://github.com/w3c/mediacapture-main","homepage":null,"size":15957,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":19,"forks":8,"open_issues":19,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132"},"html":{"href":"https://github.com/w3c/mediacapture-main/pull/132"},"issue":{"href":"https://api.github.com/repos/w3c/mediacapture-main/issues/132"},"comments":{"href":"https://api.github.com/repos/w3c/mediacapture-main/issues/132/comments"},"review_comments":{"href":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132/comments"},"review_comment":{"href":"https://api.github.com/repos/w3c/mediacapture-main/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/w3c/mediacapture-main/pulls/132/commits"},"statuses":{"href":"https://api.github.com/repos/w3c/mediacapture-main/statuses/2656f1e535a626accc2e1aa96d3f48f12babf47f"}}}}