question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WaveSurfer crash page

See original GitHub issue

Thanks a lot for the library, can some one help me?

Well i trying code an application in react with the framework, and i found some examples but doenst works with me.

i have this code:

function AudioView(props){  
    const waveSurferRef=useRef(null);
    const wavesurfer = useRef(null);

    useEffect(()=>{
        wavesurfer.current = WaveSurfer.create({
            container: waveSurferRef.current,
            waveColor: "#eee",
            progressColor: "OrangeRed",
            cursorColor: "OrangeRed",
            barWidth: 3,
            barRadius: 3,
            responsive: true,
            height: 150,
            // If true, normalize by the maximum peak instead of 1.0.
            normalize: true,
            // Use the PeakCache to improve rendering speed of large waveforms.
            partialRender: true
   
        });
        
        wavesurfer.current.load(nothing);
        return () => wavesurfer.current.destroy();

    },[]);
  

    return (
        <div className="audio-view-container" >
            <div id="waveform" ref={waveSurferRef}/>
        </div>
    )   


}

export default AudioView;

and when i execute, doenst show nothing, and others component dont show more.

the div root <div class="root"></div> dont has any child.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
Gabrielk99commented, Dec 29, 2021

@Gabrielk99 I remove the id=waversurfer (in my case) on the div and add a height and width to the div and worked

Okay, other thing u have do is add the position relative for the div that contain “wavesurfer”.

1reaction
JulianaCristinacommented, Dec 29, 2021

Same issue here

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML5 web audio API wavesurfer.js crashes on large mp3 files
I dropped a large mp3 file (around 2 hours) onto the middle of the page that asks for a file. It seems to...
Read more >
Long track (3h mp3 set) grabs to much memory and then ...
3 hours set, browser crashes probably because of it grabs too much memory. I guess lazy loading is need to implement or fix....
Read more >
Fix public page crash due to audio player, fix unpause in audio ...
-84,6 +84,7 @@ class Audio extends React.PureComponent {. if (this.wavesurfer) {, if (this.wavesurfer) {. this.wavesurfer.destroy ...
Read more >
How To Add Music Wave On Website Using HTML CSS ...
To display the sound wave on the website we will use JavaScript plugin named as Wavesurfer js Wavesurfer js official website : ...
Read more >
Browse /wavesurfer/1.8.8.p6 at SourceForge.net
WaveSurfer is an open source tool for sound visualization and manipulation. ... (mysteriously missing in 1.8.7) + mac osx 10.5 crash (bug 3078589)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found