1904labs / dom-to-image-more

Generates an image from a DOM node using HTML5 canvas
Other
486 stars 105 forks source link

youtube video with react player is giving black screen while capturing with domtoimage #144

Open Thesiva7 opened 1 year ago

Thesiva7 commented 1 year ago

youtube video with react player is giving black screen while capturing with domtoimage

domtoimage .toJpeg(data, { quality: 0.95, cacheBust: true, proxy: corsProxyUrl }) .then(function (dataUrl) { var link = document.createElement('a'); link.download = 'my-image-name.jpeg'; link.href = dataUrl; link.click(); }); any solution for this black screen.

kent99821 commented 1 year ago

Have you solved this problem yet?

IDisposable commented 1 year ago

Sadly, this is a victim to cross domain iframes, I don't think we're ever going to accomplish a fix for this in a package. The best bet for that is image capture from a headless instance of Chrome.