有什么办法保存肮脏的画布吗? [英] Is there any way to save a dirty canvas?

查看:128
本文介绍了有什么办法保存肮脏的画布吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用HTML5画布制作视频截图,视频托管在其他地方,一切工作除了toDataURL(),因为画布是脏的。所以,我想知道,有什么办法,我可以保存这个画布图像在电脑上吗?

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 there any way I can save this canvas image on the computer?

我认为答案是不是希望一些黑客得到这一点,以及任何想法除了下载视频到我的服务器,并从那里提供服务。

I assume the answer is no but hoping for some hack to get this done, well any idea apart from downloading the video to my server and serving it from there...

推荐答案

简短的答案是否。

也许您的服务器可以下载视频并托管它,然后从同一个网域进行播放。

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

如果您控制托管视频的服务器,您可以启用cors

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

(或者您可以将两者合并,并将视频上传到不是您自己的启用cors的网站。)

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

否则,你运气不好。

这篇关于有什么办法保存肮脏的画布吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆