{"action":"created","issue":{"url":"https://api.github.com/repos/webrtc/adapter/issues/408","repository_url":"https://api.github.com/repos/webrtc/adapter","labels_url":"https://api.github.com/repos/webrtc/adapter/issues/408/labels{/name}","comments_url":"https://api.github.com/repos/webrtc/adapter/issues/408/comments","events_url":"https://api.github.com/repos/webrtc/adapter/issues/408/events","html_url":"https://github.com/webrtc/adapter/issues/408","id":199520413,"number":408,"title":"getUserMedia with advanced constraints is broken","user":{"login":"ggarber","id":512252,"avatar_url":"https://avatars.githubusercontent.com/u/512252?v=3","gravatar_id":"","url":"https://api.github.com/users/ggarber","html_url":"https://github.com/ggarber","followers_url":"https://api.github.com/users/ggarber/followers","following_url":"https://api.github.com/users/ggarber/following{/other_user}","gists_url":"https://api.github.com/users/ggarber/gists{/gist_id}","starred_url":"https://api.github.com/users/ggarber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggarber/subscriptions","organizations_url":"https://api.github.com/users/ggarber/orgs","repos_url":"https://api.github.com/users/ggarber/repos","events_url":"https://api.github.com/users/ggarber/events{/privacy}","received_events_url":"https://api.github.com/users/ggarber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-01-09T10:35:12Z","updated_at":"2017-01-14T18:00:57Z","closed_at":null,"body":"**Browsers and versions affected**\r\nChrome 55 (at least, not tested with others)\r\n\r\n**Description**\r\n\r\nWhen calling getUserMedia with advanced constraints consisting in an object with multiple properties (f.e. width and height) adapter.js converts it to optional constraints and it fails because it requires multiple properties to come in separate constraints.\r\n\r\n**Steps to reproduce**\r\nRun from the command line: \r\nnavigator.mediaDevices.getUserMedia({\"audio\":true,\"video\":{\"advanced\":[{\"width\":{\"min\":1280,\"max\":1280}, \"height\":{\"min\":720,\"max\":720}}]}}).then(console.log, console.log)\r\n\r\n**Expected results**\r\nMediaStream logged\r\n\r\n**Actual results**\r\nError, invalid constraints\r\n\r\n**Workaround**\r\nPass advanced constraints with multiple properties as separate constraints:\r\nnavigator.mediaDevices.getUserMedia({\"audio\":true,\"video\":{\"advanced\":[{\"width\":{\"min\":1280,\"max\":1280}}, {\"height\":{\"min\":720,\"max\":720}}]}}).then(console.log, console.log)"},"comment":{"url":"https://api.github.com/repos/webrtc/adapter/issues/comments/272641146","html_url":"https://github.com/webrtc/adapter/issues/408#issuecomment-272641146","issue_url":"https://api.github.com/repos/webrtc/adapter/issues/408","id":272641146,"user":{"login":"jan-ivar","id":3136226,"avatar_url":"https://avatars.githubusercontent.com/u/3136226?v=3","gravatar_id":"","url":"https://api.github.com/users/jan-ivar","html_url":"https://github.com/jan-ivar","followers_url":"https://api.github.com/users/jan-ivar/followers","following_url":"https://api.github.com/users/jan-ivar/following{/other_user}","gists_url":"https://api.github.com/users/jan-ivar/gists{/gist_id}","starred_url":"https://api.github.com/users/jan-ivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jan-ivar/subscriptions","organizations_url":"https://api.github.com/users/jan-ivar/orgs","repos_url":"https://api.github.com/users/jan-ivar/repos","events_url":"https://api.github.com/users/jan-ivar/events{/privacy}","received_events_url":"https://api.github.com/users/jan-ivar/received_events","type":"User","site_admin":false},"created_at":"2017-01-14T18:00:57Z","updated_at":"2017-01-14T18:00:57Z","body":"@ggarber Use [new constraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Parameters):\r\n```js\r\nvideo: {\r\n  width: {min: 1024, ideal: 1280, max: 1920},\r\n  height: {min: 776, ideal: 720, max: 1080}\r\n}\r\n```\r\n@ngauthier Does it work without adapter?"}}
{"actor":{"display_login":"jan-ivar"}}