airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
29.85k stars 2.85k forks source link

Issue with lottie_canvas_worker CVImageElement drawImage #3036

Open romainsimoes opened 8 months ago

romainsimoes commented 8 months ago

Using the lottie_canvas_worker.js from the build, I encounter an issue with CVImageElement.prototype.renderInnerContent.

The following code : this.canvasContext.drawImage(this.img, 0, 0);

Throw the following error : Failed to execute 'drawImage' on 'OffscreenCanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or OffscreenCanvas or SVGImageElement or VideoFrame)'.

The this.img object is an instance of ProxyElement and therefore can't be used with the Canvas context drawImage directly.

Do you have any clue about why this happen ?

Further informations :