- From: Jan-Ivar Bruaroey <jib@mozilla.com>
- Date: Fri, 6 Jan 2017 15:15:35 -0500
- To: Harald Alvestrand <harald@alvestrand.no>, "public-webrtc@w3.org" <public-webrtc@w3.org>
I agree with the concerns you're raising. But on the solution, I think forcing people to declare what they're going to use is laborious. Also, what they declare and what they end up using may still differ (e.g. they cut'n'paste some "turn on everything" boilerplate from stackoverflow or wherever). Instead, we could learn exactly what they're using by putting getters in the objects in the map. Firefox does this already on the map object itself, to detect legacy use (see deprecation warning in web console): http://jsfiddle.net/jib1/spbhgx36/ This might be a bigger change to the spec than implementations, as it might mean converting the dictionaries to interfaces... .: Jan-Ivar :. On 1/4/17 4:12 AM, Harald Alvestrand wrote: > [Trying out pinging the list instead of / before raising an issue] > > Happy new year, everyone! > > In preparing for the switch from Chrome's nonstandard "getStats" call to > the standard, we've found some issues with the changeover, which we > think will be reflected in future work on extending the stats model. > > Namely: > > - There's no way of figuring out who uses a stats field. This means that > we can't tell if it's safe to delete it. > > - There's no way to add "experimental" stats fields and have them only > impact implementations that actively want to use it. If we add a stat, > it will show up for everyone. > > One possibility I've considered is to add API for this - something like > this: > > pc.EnableExperimentalStats("peer-connection", "deeplyStrangeStatistic") > .then(function(neededEnabling) { > if (neededEnabling) { > log('deeplyStrangeStatistic is enabled for experimentation') > } else { > log('deeplyStrangeStatistic is now part of the spec, stop > bothering me') > } > }) > .catch(e => log('Cant enable deeplyStrangeStatistic, platform may not > have implemented it') > > This would allow: > > - JS to know if the statistic is availble or not > - The UA to collect stats on if anyone's using the non-standard statistic > - The UA to emit deprecation messages for "going to be deleted" > experimental statistics (because there's a JS call that can trigger the > deprecation message) > > Floating this as an idea. Does it make sense to people? >
Received on Friday, 6 January 2017 20:16:10 UTC