{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3951","repository_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios","labels_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3951/labels{/name}","comments_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3951/comments","events_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3951/events","html_url":"https://github.com/mozilla-mobile/firefox-ios/issues/3951","id":326415273,"node_id":"MDU6SXNzdWUzMjY0MTUyNzM=","number":3951,"title":"Why Firefox in IOS Mobile is not supporting the webRTC and MediaDevices.getUserMedia()","user":{"login":"kundan52","id":10497423,"node_id":"MDQ6VXNlcjEwNDk3NDIz","avatar_url":"https://avatars3.githubusercontent.com/u/10497423?v=4","gravatar_id":"","url":"https://api.github.com/users/kundan52","html_url":"https://github.com/kundan52","followers_url":"https://api.github.com/users/kundan52/followers","following_url":"https://api.github.com/users/kundan52/following{/other_user}","gists_url":"https://api.github.com/users/kundan52/gists{/gist_id}","starred_url":"https://api.github.com/users/kundan52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kundan52/subscriptions","organizations_url":"https://api.github.com/users/kundan52/orgs","repos_url":"https://api.github.com/users/kundan52/repos","events_url":"https://api.github.com/users/kundan52/events{/privacy}","received_events_url":"https://api.github.com/users/kundan52/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-25T07:44:37Z","updated_at":"2018-06-01T02:57:20Z","closed_at":null,"author_association":"NONE","body":"Hi, I am Trying to create browser based QR code reader, it works in Android but in IOS 11 or any version of IOS its not working, as you I can't debug it in IOS for Firefox.\r\n\r\nbelow is my code\r\n\r\n```\r\n\r\n\r\n\t\t\t    \r\n\t\t\t\t // Older browsers might not implement mediaDevices at all, so we set an empty object first\r\n\t\t\t\t    if (navigator.mediaDevices === undefined) {\r\n\t\t\t\t      navigator.mediaDevices = {};\r\n\t\t\t\t    }\r\n\r\n\t\t\t\t    // Some browsers partially implement mediaDevices. We can't just assign an object\r\n\t\t\t\t    // with getUserMedia as it would overwrite existing properties.\r\n\t\t\t\t    // Here, we will just add the getUserMedia property if it's missing.\r\n\t\t\t\t    if (navigator.mediaDevices.getUserMedia === undefined) {\r\n\t\t\t\t      navigator.mediaDevices.getUserMedia = function(constraints) {\r\n\r\n\t\t\t\t        // First get ahold of the legacy getUserMedia, if present\r\n\t\t\t\t        var getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia;\r\n\r\n\t\t\t\t        // Some browsers just don't implement it - return a rejected promise with an error\r\n\t\t\t\t        // to keep a consistent interface\r\n\t\t\t\t        if (!getUserMedia) {\r\n\t\t\t\t          return Promise.reject(new Error('getUserMedia is not implemented in this browser'));\r\n\t\t\t\t        }\r\n\r\n\t\t\t\t        // Otherwise, wrap the call to the old navigator.getUserMedia with a Promise\r\n\t\t\t\t        return new Promise(function(resolve, reject) {\r\n\t\t\t\t          getUserMedia.call(navigator, constraints, resolve, reject);\r\n\t\t\t\t        });\r\n\t\t\t\t      }\r\n\t\t\t\t    }\r\n\r\n\t\t\t\t    navigator.mediaDevices.getUserMedia({ video: { facingMode: { exact: \"environment\" } } })\r\n\t\t\t\t    .then(function(stream) {\r\n\r\n\t\t\t\t      // Older browsers may not have srcObject\r\n\t\t\t\t      if (\"srcObject\" in video) {\r\n\t\t\t\t        video.srcObject = stream;\r\n\t\t\t\t      } else {\r\n\t\t\t\t        // Avoid using this in new browsers, as it is going away.\r\n\t\t\t\t        video.src = window.URL.createObjectURL(stream);\r\n\t\t\t\t      }\r\n\r\n\t\t\t\t      video.onloadedmetadata = function(e) {\r\n\t\t\t\t        video.play();\r\n\t\t\t\t        video.setAttribute(\"playsinline\", true); // required to tell iOS safari we don't want fullscreen\r\n\t\t\t\t      };\r\n\t\t\t\t      requestAnimationFrame(tick);\r\n\t\t\t\t      localStream = stream;\r\n\t\t\t\t    })\r\n\t\t\t\t    .catch(function(err) {\r\n\t\t\t\t      console.log(err.name + \": \" + err.message);\r\n\t\t\t\t    });\r\n\t\t\t\t    \r\n```\r\n\r\nIs Mozilla does not support the webRTC and MediaDevices.getUserMedia() in IOS mobile?\r\nIf Yes, when it will be supported?"},"comment":{"url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/comments/393743685","html_url":"https://github.com/mozilla-mobile/firefox-ios/issues/3951#issuecomment-393743685","issue_url":"https://api.github.com/repos/mozilla-mobile/firefox-ios/issues/3951","id":393743685,"node_id":"MDEyOklzc3VlQ29tbWVudDM5Mzc0MzY4NQ==","user":{"login":"ExE-Boss","id":3889017,"node_id":"MDQ6VXNlcjM4ODkwMTc=","avatar_url":"https://avatars0.githubusercontent.com/u/3889017?v=4","gravatar_id":"","url":"https://api.github.com/users/ExE-Boss","html_url":"https://github.com/ExE-Boss","followers_url":"https://api.github.com/users/ExE-Boss/followers","following_url":"https://api.github.com/users/ExE-Boss/following{/other_user}","gists_url":"https://api.github.com/users/ExE-Boss/gists{/gist_id}","starred_url":"https://api.github.com/users/ExE-Boss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExE-Boss/subscriptions","organizations_url":"https://api.github.com/users/ExE-Boss/orgs","repos_url":"https://api.github.com/users/ExE-Boss/repos","events_url":"https://api.github.com/users/ExE-Boss/events{/privacy}","received_events_url":"https://api.github.com/users/ExE-Boss/received_events","type":"User","site_admin":false},"created_at":"2018-06-01T02:57:20Z","updated_at":"2018-06-01T02:57:20Z","author_association":"NONE","body":"> When it will be supported?\r\n\r\nWhenever the overlords at Apple decide to make that feature available to 3rd party browsers.\r\n\r\nAlso, [HTML5test](https://html5test.com) reports WebRTC 1.0 as supported on Firefox 12.0 for iOS 11.4."}}
{"actor":{"display_login":"ExE-Boss"}}