- From: Jan-Ivar Bruaroey <jib@mozilla.com>
- Date: Mon, 06 Oct 2014 16:10:16 -0400
- To: Chris Wilson <cwilso@google.com>, Anne van Kesteren <annevk@annevk.nl>
- CC: Eric Rescorla <ekr@rtfm.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 10/6/14, 10:52 AM, Chris Wilson wrote: > I support moving to Promises sooner rather than later. > > To be fair, though, just claiming "people are using the prefixed > variant" isn't totally representative - all they need is > "navigator.getUserMedia = navigator.getUserMedia || > navigator.webkitGetUserMedia || navigator.mozGetUserMedia;" somewhere > in their JS, and they can act as if it's unprefixed. I agree that people ||'ing like this pretty much negates any technical value of prefixing. Ironically, in reverse order it would have had merit. E.g. navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.getUserMedia; would have actually guaranteed compatibility for a script for much longer (as long as browsers supported a prefixed version, and would have given browsers the option to keep such users working the old way). So I fully agree that prefixes offer nothing technically, but they have important psychological value since people are aware they are building on a changing foundation, and have implicitly "signed on" and hopefully budgeted in time to correct their code when the final API becomes available. I.e. there would be no surprises *if* there was rug-pulling, as it would have been on people with sea legs. In spite of this we're *not* pulling any rugs. > The Promises changeover will be a bit more impactful. Luckily changes here are solely in APIs not implemented yet (mediaDevices and mediaStreamTrack), so any changeover to promises in existing code is entirely voluntary until we start adding deprecation warnings to old navigator.getUserMedia, which the strawman proposal argues shouldn't happen for two years. I think that's more than lenient. Too lenient in fact, and a mistake, but I've said I'm willing to live with it in the interest of moving forward, so there we go. .: Jan-Ivar :.
Received on Monday, 6 October 2014 20:10:46 UTC