Skip to content

Instantly share code, notes, and snippets.

@katspaugh
Created January 13, 2024 15:44
Show Gist options
  • Save katspaugh/29e402e400f63236249c634a0805a693 to your computer and use it in GitHub Desktop.
Save katspaugh/29e402e400f63236249c634a0805a693 to your computer and use it in GitHub Desktop.
// 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