I've been trying to handle canvas.toBlob with observables in rxjs instead of promise or callbacks. bindCallback operator seems to fit so I've tried like:
bindCallback(canvas.toBlob)().pipe(
map((blob: Blob) => URL.createObjectURL(blob))
);
but it gives me ERROR TypeError: Illegal invocation error.
If the operator doesn't fit, any other idea for this? Appreciate any insight. Thanks.