Hi there,
Where do I need to add my custom JS script & PHP?
In my WC Single Layout I want to add this to the JS custom code option:
<div id="waveform">
<!-- the waveform will be rendered here -->
</div>
<script type="module">
import WaveSurfer from 'https://unpkg.com/wavesurfer.js@7/dist/wavesurfer.esm.js'
const wavesurfer = WaveSurfer.create({
container: '#waveform',
waveColor: '#4F4A85',
progressColor: '#383351',
url: '/audio.mp3',
})
wavesurfer.on('interaction', () => {
wavesurfer.play()
})
</script>