dom-to-image
dom-to-image copied to clipboard
Add support for rendering video as image
When processing the video clone, we override the clone element with an image element, which either contains the successful render of the video element (drawn to a canvas), or a single 1x1 transparent pixel (stretched to the original element's dimensions).
For videos cross-origin, the transparent pixel is used, as the canvas which the video is drawn to becomes tainted. And for videos which don't match the dimensions of the element, the scaling & offset is applied to the image as well.
One strange thing with adding
Refreshing the window, or in my case the embedded
Not entirely sure at this current time what the issue is. I am going to do some profiling to see whether I can diagnose the actual root cause.
Why was this not merged yet?