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.

exportImage() returns no data (empty base64)

See original GitHub issue

Hi @katspaugh

From the new version-3.0.0 I faced the problem, which is wave surfer, ready returns empty base64 when am using export image function.

I debugged your js, you called the fireEvent ready after draw buffer() function, Once the ready event triggers then only the draw buffer draws. But in version 1.2.3 this problem is not occurring, I submit my code here. if any mistake means kindly knows a solution. Thanks in advance.

 var wavesurfer = WaveSurfer.create({
        container: '#waveform',
        waveColor: '#D2EDD4',
        progressColor: '#46B54D',
        barHeight: 1.4 
    });
    
    wavesurfer.on('ready', function () {
      console.log(wavesurfer.exportImage())
    });
    
    wavesurfer.load('https://ia800508.us.archive.org/15/items/LoveThemeFromTheGodfather/02LoveThemeFromTheGodfather.mp3');

cc: @thijstriemstra

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
arsh-swcommented, May 23, 2020

For me it works if I run it after a timeout.

setTimeout(function () {
              var imgSrc = wavesurfer.exportImage();
}, 800);
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to save a PNG image server-side, from a base64 data URI
You need to extract the base64 image data from that string, decode it and then you can save it to disk, you don't...
Read more >
ExportPrintPreviewToImage Tag - BarTender
Exports an entire print job (all pages) to one or more images. The images can be saved to a file, or files, and...
Read more >
imageDataURL - API Reference - Kendo UI Chart
imageDataURL. Returns a PNG image of the chart encoded as a Data URL. This method is deprecated and replaced by exportImage.
Read more >
Reference-Tableau Server REST API
Create and apply a data quality warning to a database, table, column, published data source, flow, virtual connection, or virtual connection table. Only...
Read more >
Reference:GeoGebra Apps API
getScreenshotBase64(function(url){window.open("data:image/png;base64,"+url);}); ... This does not start the animation yet, use startAnimation() to do so.
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