How should I use api.captureLargeVideoScreenshot()

I am trying to use api.captureLargeVideoScreenshot() and expecting it returns a dataURL string. But instead it return a string “[Object object]”. Same happens to getPaticipentInfo. Other functions works fine so I am wondering what is wrong with these two.
I was trying to do the following
function screenshot(){
api.captureLargeVideoScreenshot().then(dataURL => {
var myCanvas = document.getElementById(‘myCanvas’);
var ctx = myCanvas.getContext(‘2d’);
var img = new Image;
img.onload = function(){
ctx.drawImage(img,0,0); // Or at whatever offset you like
img.setAttribute(“src”, dataURL);

Hi. the api call return a javascript object. Only you need access to the object key:

(yes… the key is the same name that the callback variable, if you wish you can use another variable name)

api.captureLargeVideoScreenshot().then(dataURL => {

      // The next line is an error at the documentation:
           // dataURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABQAA..."
     // may be ... ;
           // dataURL = { "dataURL" :  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABQAA..." }

// ......... your code

        img.src= dataURL.dataURL;

// ........ your code