qq15725 / modern-screenshot

📸 Quickly generate image from DOM node using HTML5 canvas and SVG
https://toolpkg.com/html-to-image
MIT License
504 stars 36 forks source link

截屏中带有视频的不好用 #10

Closed syx496602504 closed 1 year ago

syx496602504 commented 1 year ago
 data() {
        return {
          code: `<div style="text-align: center;">
  <h1>egami</h1>
  <h1>→</h1>
  <h1>image</h1>
  <video src='https://www.runoob.com/try/demo_source/movie.mp4' controls autoPlay></video>
</div>`,
          src: null,
        }
      },

image

qq15725 commented 1 year ago

已修复,目前 video 截图需要视频源支持 CORS

https://modern-screenshot.vercel.app

示例提供了同源情况

<div style="text-align: center;">
  <h1>egami</h1>
  <h1>→</h1>
  <h1>image</h1>
  <video src="/movie.mp4" controls autoPlay></video>
</div>

image