code: function renderAsWebP(canvas, quality) {
              var
                  frame = canvas.toDataURL('image/webp', {quality: quality});
              
              return decodeBase64WebPDataURL(frame);
          }
docs: Convert the given canvas to a WebP encoded image and return the image data as a string.