用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';

 

posted @ 2020-09-26 18:38  johnjackson  阅读(649)  评论(0编辑  收藏  举报