Created
January 13, 2024 15:44
-
-
Save katspaugh/29e402e400f63236249c634a0805a693 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set height on click | |
import WaveSurfer from 'wavesurfer.js' | |
const wavesurfer = WaveSurfer.create({ | |
container: document.body, | |
waveColor: 'rgb(200, 0, 200)', | |
progressColor: 'rgb(100, 0, 100)', | |
url: '/examples/audio/audio.wav', | |
}) | |
wavesurfer.on('click', () => { | |
wavesurfer.setOptions({ height: 300 }) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment