Here's a quick and dirty jsbin example: http://jsbin.com/ahocUt/1/edit
Unless there's something I'm missing in the spec, the reduction
param doesn't fire any events. You just need to read it on-demand. In my example, that's just happening with a requestAnimationFrame
loop.
The other thing you're missing is that you need to set the params with compressor.threshold.value
, because compressor.threshold
is actually an object.
Hope that helps.