Contact emails
rt...@chromium.org, hong...@chromium.org
Spec
http://webaudio.github.io/web-audio-api/,
http://webaudio.github.io/web-audio-api/#widl-DynamicsCompressorNode-reduction
Summary
The reduction attribute for the DynamicsCompressor node is currently implemented as an AudioParam. However, the WebAudio spec says it should be a readonly float.
Motivation
Aligns Chrome with the spec.
Interoperability and Compatibility Risk
Firefox already implements this as a float. Safari still follows Chrome. I did not check Edge, but suspect it also implements it as a float.
There is a compatibility risk because this change is not backward compatible. Previously, the developer would use node.reduction.value to get the value. Now it will be node.reduction.
Also, it doesn't really make sense for it to be an AudioParam, as explained in https://github.com/WebAudio/web-audio-api/issues/761#issuecomment-196934604
Ongoing technical constraints
None.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
OWP launch tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/features/5086921298542592
Requesting approval to ship?
Yes.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
// Create a compressor node
var compressor = audioCtx.createDynamicsCompressor();
...
compressor.reduction.value = -20;
Let's hope that existing Web content doesn't rely on this. Do you know if Blink and WebKit are going to update their implementations accordingly?
This spec fix came from the Blink folks, so I'm sure they update their implementation (if not already, I don't have a canary build here). I don't think existing applications use this attribute much, its sole purpose is for monitoring, and I haven't seen a lot of compressor usage, let alone any kind of monitoring of the compressor itself, in the wild. This is just anecdotal, though.
That's definitely and option, but it's tricky in itself. Eg. what's the guidance we'd give for avoiding getting the deprecation message? Just don't use the API at all until we fix it? Presumably it's not possible to feature-detect this in a way that wouldn't trigger the deprecation message, right? We really want to avoid sending warnings when developers are following our guidance (dramatically weakens the strength of our warnings in general). Also if we delay, usage may just go up making the problem worse.
I think the key is understanding how breaking this is in practice and if there's anything we can do to mitigate the break. Eg. if 3 of the 5 httparchive results are using the same shared open source library on GitHub then we should submit a pull-request to that library. Or maybe we'll get lucky and none of the sites will have a noticeable behavior change (eg. they sound slightly worse but the unhandled exception doesn't cause any more problems than that). In which case I'd say it's probably best to just make the change and watch for any major fallout in beta. Regardless we should make sure this change is included in the beta blog post, and that the chromestatus entry includes a link to a sample which correctly works with both APIs (eg. using typeof to make the usage conditional).Sound reasonable?
On Thu, Mar 17, 2016 at 9:25 AM, Rick Byers <rby...@chromium.org> wrote:That's definitely and option, but it's tricky in itself. Eg. what's the guidance we'd give for avoiding getting the deprecation message? Just don't use the API at all until we fix it? Presumably it's not possible to feature-detect this in a way that wouldn't trigger the deprecation message, right? We really want to avoid sending warnings when developers are following our guidance (dramatically weakens the strength of our warnings in general). Also if we delay, usage may just go up making the problem worse.I thought maybe we could support both, but I think that's pretty gross. I'm not even sure if we could and it would be very weird.I think the key is understanding how breaking this is in practice and if there's anything we can do to mitigate the break. Eg. if 3 of the 5 httparchive results are using the same shared open source library on GitHub then we should submit a pull-request to that library. Or maybe we'll get lucky and none of the sites will have a noticeable behavior change (eg. they sound slightly worse but the unhandled exception doesn't cause any more problems than that). In which case I'd say it's probably best to just make the change and watch for any major fallout in beta. Regardless we should make sure this change is included in the beta blog post, and that the chromestatus entry includes a link to a sample which correctly works with both APIs (eg. using typeof to make the usage conditional).Sound reasonable?Yes, sounds like a plan. FWIW, I looked through Bugzila for issues. I couldn't find any related to reduction not working for Firefox. I'll take that as a good sign that no one is actually using it.Curiously, Edge says it uses an AudioParam: https://msdn.microsoft.com/en-us/library/dn954869(v=vs.85).aspx I'm rather surprised since the change went in to the spec 2 years ago.
On Thu, Mar 17, 2016 at 5:27 PM, Raymond Toy <rt...@google.com> wrote:On Thu, Mar 17, 2016 at 9:25 AM, Rick Byers <rby...@chromium.org> wrote:That's definitely and option, but it's tricky in itself. Eg. what's the guidance we'd give for avoiding getting the deprecation message? Just don't use the API at all until we fix it? Presumably it's not possible to feature-detect this in a way that wouldn't trigger the deprecation message, right? We really want to avoid sending warnings when developers are following our guidance (dramatically weakens the strength of our warnings in general). Also if we delay, usage may just go up making the problem worse.I thought maybe we could support both, but I think that's pretty gross. I'm not even sure if we could and it would be very weird.I think the key is understanding how breaking this is in practice and if there's anything we can do to mitigate the break. Eg. if 3 of the 5 httparchive results are using the same shared open source library on GitHub then we should submit a pull-request to that library. Or maybe we'll get lucky and none of the sites will have a noticeable behavior change (eg. they sound slightly worse but the unhandled exception doesn't cause any more problems than that). In which case I'd say it's probably best to just make the change and watch for any major fallout in beta. Regardless we should make sure this change is included in the beta blog post, and that the chromestatus entry includes a link to a sample which correctly works with both APIs (eg. using typeof to make the usage conditional).Sound reasonable?Yes, sounds like a plan. FWIW, I looked through Bugzila for issues. I couldn't find any related to reduction not working for Firefox. I'll take that as a good sign that no one is actually using it.Curiously, Edge says it uses an AudioParam: https://msdn.microsoft.com/en-us/library/dn954869(v=vs.85).aspx I'm rather surprised since the change went in to the spec 2 years ago.Edge often copies Chrome's bugs unfortunately. This may be a sign that they hit a real-world site that was affected... Any WebAudio contacts there you could ask?
Rick, this is very interesting database and thanks for your insight on this.Can you let us know how to use httparchive and custom query? We could use the data for future intent.
I asked Microsoft's WebAudio representative. They also implement reduction as an AudioParam and not a float. He also said making it a float makes sense and is something then could do.
So sorry for the delay!So the conclusion from the analysis of the httparchive results was that there were really only 2 sites (of top 500k) that would be broken by this change (both due to Klang.js). Has anyone reached out to the maintainers of klang.js (presumably in...@plan8.se) to let them know about this change?I agree with the conclusion that, while a breaking change, all indications are that the total breakage will be very small, easy to understand/correct, and the alternative (adding a new API under a new name, trying to deprecate the old one, etc.) is probably not worth the cost (platform complexity, developer confusion, etc.). So LGTM1 to ship assuming someone at least reaches out to klang.js maintainers.
On Tue, Apr 19, 2016 at 10:51 AM, Rick Byers <rby...@chromium.org> wrote:So sorry for the delay!So the conclusion from the analysis of the httparchive results was that there were really only 2 sites (of top 500k) that would be broken by this change (both due to Klang.js). Has anyone reached out to the maintainers of klang.js (presumably in...@plan8.se) to let them know about this change?I agree with the conclusion that, while a breaking change, all indications are that the total breakage will be very small, easy to understand/correct, and the alternative (adding a new API under a new name, trying to deprecate the old one, etc.) is probably not worth the cost (platform complexity, developer confusion, etc.). So LGTM1 to ship assuming someone at least reaches out to klang.js maintainers.hongchan@ sent an email to the klang.js maintainers, and I've updated the chrome features entry to include a link to a polyfill for this.
On Tue, Apr 19, 2016 at 4:33 PM, Raymond Toy <rt...@google.com> wrote:On Tue, Apr 19, 2016 at 10:51 AM, Rick Byers <rby...@chromium.org> wrote:So sorry for the delay!So the conclusion from the analysis of the httparchive results was that there were really only 2 sites (of top 500k) that would be broken by this change (both due to Klang.js). Has anyone reached out to the maintainers of klang.js (presumably in...@plan8.se) to let them know about this change?I agree with the conclusion that, while a breaking change, all indications are that the total breakage will be very small, easy to understand/correct, and the alternative (adding a new API under a new name, trying to deprecate the old one, etc.) is probably not worth the cost (platform complexity, developer confusion, etc.). So LGTM1 to ship assuming someone at least reaches out to klang.js maintainers.hongchan@ sent an email to the klang.js maintainers, and I've updated the chrome features entry to include a link to a polyfill for this.Looks great, thank you for the extra developer outreach here!Chris, WDYT - does this discussion address your question/concern about the compat risk?