用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';
原文地址:https://www.cnblogs.com/johnjackson/p/13736147.html