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);