{"action":"created","issue":{"url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/72","labels_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/72/comments","events_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/72/events","html_url":"https://github.com/eface2face/cordova-plugin-iosrtc/issues/72","id":107650721,"number":72,"title":"getUserMedia sourceId constraint not switching cameras","user":{"login":"m59peacemaker","id":4369247,"avatar_url":"https://avatars.githubusercontent.com/u/4369247?v=3","gravatar_id":"","url":"https://api.github.com/users/m59peacemaker","html_url":"https://github.com/m59peacemaker","followers_url":"https://api.github.com/users/m59peacemaker/followers","following_url":"https://api.github.com/users/m59peacemaker/following{/other_user}","gists_url":"https://api.github.com/users/m59peacemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/m59peacemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m59peacemaker/subscriptions","organizations_url":"https://api.github.com/users/m59peacemaker/orgs","repos_url":"https://api.github.com/users/m59peacemaker/repos","events_url":"https://api.github.com/users/m59peacemaker/events{/privacy}","received_events_url":"https://api.github.com/users/m59peacemaker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-22T05:58:19Z","updated_at":"2015-09-23T08:31:04Z","closed_at":"2015-09-22T08:30:51Z","body":"It appears that iosrtc expects a `sourceId` which corresponds to the `deviceId` returned from `enumerateDevices` and this property should be nested in the mandatory or optional object of the video constraints. I get the following as deviceId's:\r\n\r\n    com.apple.avfoundation.avcapturedevice.built-in_video:0\r\n    com.apple.avfoundation.avcapturedevice.built-in_video:1\r\n\r\nhttps://github.com/eface2face/cordova-plugin-iosrtc/blob/master/js/getUserMedia.js#L84\r\n\r\nI have tried applying both of those as sourceId and also just a `0` and `1` in case that mattered. In each case, only the front-facing camera is used."},"comment":{"url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/comments/142528678","html_url":"https://github.com/eface2face/cordova-plugin-iosrtc/issues/72#issuecomment-142528678","issue_url":"https://api.github.com/repos/eface2face/cordova-plugin-iosrtc/issues/72","id":142528678,"user":{"login":"m59peacemaker","id":4369247,"avatar_url":"https://avatars.githubusercontent.com/u/4369247?v=3","gravatar_id":"","url":"https://api.github.com/users/m59peacemaker","html_url":"https://github.com/m59peacemaker","followers_url":"https://api.github.com/users/m59peacemaker/followers","following_url":"https://api.github.com/users/m59peacemaker/following{/other_user}","gists_url":"https://api.github.com/users/m59peacemaker/gists{/gist_id}","starred_url":"https://api.github.com/users/m59peacemaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m59peacemaker/subscriptions","organizations_url":"https://api.github.com/users/m59peacemaker/orgs","repos_url":"https://api.github.com/users/m59peacemaker/repos","events_url":"https://api.github.com/users/m59peacemaker/events{/privacy}","received_events_url":"https://api.github.com/users/m59peacemaker/received_events","type":"User","site_admin":false},"created_at":"2015-09-23T08:31:04Z","updated_at":"2015-09-23T08:31:04Z","body":"Perhaps I see it - it's supposed to be in an object inside an array? I've never seen that done before. I'll try it."}}