transitive-bullshit / puppeteer-lottie

Renders Lottie animations via Puppeteer to image, GIF, or MP4.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issues implementing background color

AustinHatem opened this issue · comments

I'm having issues customizing the background colors for exporting to .png or .mp4.

It seems this issue was solved here: #transitive-bullshit/puppeteer-lottie-cli#12

here is my code:

await renderLottie({ animationData: JSON.parse(data), output: downloadPath, background: '#000000', height: canvasHeight, width: canvasWidth, puppeteerOptions:{ args: ['--no-sandbox', '--disable-setuid-sandbox'] }

the png is still coming back with a transparent background. Thanks.

the black background is hardcoded here https://github.com/transitive-bullshit/puppeteer-lottie/blob/master/index.js#L313 @transitive-bullshit can I make a PR to have this configurable, or am I missing something maybe?