You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a Minimap after the main wavesurfer has already rendered. When I do that the minimap never shows up. I can see it in the DOM, but it doesn't render a waveform or anything.
Environment
Browser: Firefox, Chrome, Safari
Minimal code snippet
Altering the minimap example slightly will demonstrate the problem. Instead of passing the minimap in the plugins array when the wavesurfer is created, I'm trying to register is after the ready event has fired.
importWaveSurferfrom'wavesurfer.js'importMinimapfrom'wavesurfer.js/dist/plugins/minimap.esm.js'// Create an instance of WaveSurferconstws=WaveSurfer.create({container: '#waveform',waveColor: 'rgb(200, 0, 200)',progressColor: 'rgb(100, 0, 100)',url: '/examples/audio/audio.wav',minPxPerSec: 100,hideScrollbar: true,autoCenter: false})ws.once('ready',()=>{letmap=Minimap.create({height: 20,waveColor: '#ddd',progressColor: '#999',})console.log('trying to register minimap',map);ws.registerPlugin(map);})
Expected result
I'd expect the minimap to render just the same as if it had been pre-constructed.
Obtained result
A div is added to the DOM that seems intended to hold the minimap, but the map itself is never rendered.
Screenshots
Expected:
Actual:
The text was updated successfully, but these errors were encountered:
Bug description
I'm trying to create a Minimap after the main wavesurfer has already rendered. When I do that the minimap never shows up. I can see it in the DOM, but it doesn't render a waveform or anything.
Environment
Minimal code snippet
Altering the minimap example slightly will demonstrate the problem. Instead of passing the minimap in the
plugins
array when the wavesurfer is created, I'm trying to register is after theready
event has fired.Expected result
I'd expect the minimap to render just the same as if it had been pre-constructed.
Obtained result
A div is added to the DOM that seems intended to hold the minimap, but the map itself is never rendered.
Screenshots
Expected:
Actual:
The text was updated successfully, but these errors were encountered: