mCanvas = document.querySelector('canvas.waveform');
          let waveformCtx = waveformCanvas.getContext('2d');

          let resizeTimeout = null;

          const adjustCanvasWidth = () => {
            spectrumCanvas.setAttribute('width', spectrumCanvas.parentNode.offsetWidth);
            waveformCanvas.setAttribute('width', waveformCanvas.parentNode.offsetWidth);
          };
          adjustCanvasWidth();
          window.addEventListener('resize', (e) => {
            clearTimeout(resizeTimeout);
