peaks.js
peaks.js copied to clipboard
Add more configuration options to the overview waveform, make it possible to turn on or off the axes
You can now configure:
- The highlight rectangle padding (we use this because we make our overview bar smaller)
- The highlight rectangle opacity
- The overview axis colors
This now goes against latest master :)
@oncletom Any chance of getting this reviewed? :)
Hey!
Thanks for the proposals, they are valuable options!
The list of options is now very long, and I wonder how effective it is for newcomers and peaks users.
In issue #53, I propose to use the same config objects but to pass them to the views directly in order to control them. Next step would be to use the same objects for both views (zoom and overview) and to affect their layout only via configuration. Peaks responsibility would then be to synchronise/handle/dispatch events to the views/media player.
Looking at that API, I'm not sure that it covers the same things. This PR gives you some more knobs to turn to customize the appearance of the waveforms (ideally, all of the constants are configurable, but we haven't needed to change everything). I'm all for abstracting that away, I'm just not entirely sure how. In an ideal world, it's controllable via CSS - but I realize you can't do that because we're talking about a canvas.