用canvas做视频截图遇到的坑
https://blog.csdn.net/sai739295732/article/details/78475821
关键点:
前端JS:
video.setAttribute('crossOrigin', 'anonymous');
服务器(nginx):
add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Methods 'GET,POST,OPTIONS'; add_header Access-Control-Allow-Headers 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
喜欢的话,请点赞,转发、收藏、评论,谢谢!