W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > June 2016

Re: [mediacapture-main] Remove navigator.getUserMedia from the spec.

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Thu, 23 Jun 2016 15:14:30 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-228082788-1466694870-sysbot+gh@w3.org>
@alvestrand Thanks for correcting me. My mistake, and I'm glad to hear
 I was wrong, as what you describe sounds like a good solution. Sorry 
for speculating.

So I'm glad there's no harm, but back to benefits, I still don't see 
many (except the marginal one I mentioned).

There really isn't an existing old coherent legacy population helped 
by `navigator.getUserMedia` becoming available. Your point about 
*TypeError*ing on mixed constraints I think illustrates this: Any 
working legacy code out there using constraints has to be using 
feature detection:
```js
if ("webkitGetUserMedia" in navigator) {
    navigator.webkitGetUserMedia(chromeConstraints, y, n);
} else {
    (navigator.getUserMedia || navigator.mozGetUserMedia) 
(specConstraints, y, n);
}
```

Yes that's quite horrible, but we already have a solution established 
two years ago:
```js
navigator.mediaDevice.getUserMedia(specConstraints).then(y, n);
```
so why do we need another solution?

My concern here is convergence, as `navigator.getUserMedia` has the 
better name (less typing).

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at 
https://github.com/w3c/mediacapture-main/issues/368#issuecomment-228082788
 using your GitHub account
Received on Thursday, 23 June 2016 15:14:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:29 UTC