Is there any way to save a dirty canvas?

后端 未结 3 1073
夕颜
夕颜 2021-01-21 06:57

I am making screenshots of videos with HTML5 canvas, the video is hosted elsewhere, everything works except toDataURL() because the canvas is dirty. So, I am wondering, is ther

3条回答
  •  萌比男神i
    2021-01-21 07:05

    The short answer is "No."

    The longer answer might be yes.

    Maybe your server can download the video and host it, then play it from your same domain?

    If you control the server that is hosting the video you could enable cors.

    (Or you could combine the two and have the video uploaded to a cors-enabled site that is not your own.)

    Otherwise, you're out of luck.

提交回复
热议问题