Is it possible to render a gradient for the progressColor?
Naively I'm going to say this is possible to do with https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient
It might be possible to pass a Canvas gradient object as progressColor, but I'm not sure. Try it.
Yes, it's actually working. Use this code:
var linGrad = document.createElement('canvas').getContext('2d').createLinearGradient(0, 0, 1000, 128);
linGrad.addColorStop(0, '#8ED6FF');
linGrad.addColorStop(1, '#004CB3');
var wavesurfer = WaveSurfer.create({
container: '#waveform',
progressColor: linGrad
});
See live demo here: http://plnkr.co/edit/L99eTSvAkuVJDOXtdCDu?p=preview
Most helpful comment
Yes, it's actually working. Use this code:
See live demo here: http://plnkr.co/edit/L99eTSvAkuVJDOXtdCDu?p=preview