我想从 html5 视频标签中捕获和上传缩略图,
这是我的代码
var w = 135;//video.videoWidth * scaleFactor;
var h = 101;//video.videoHeight * scaleFactor;
var canvas = document.createElement('canvas');
canvas.width = w;
canvas.height = h;
var ctx = canvas.getContext('2d');
ctx.drawImage(_video, 0, 0, w, h);
canvas.toDataURL("image/jpg");
var blob = canvas.msToBlob();
我在 chrome 浏览器中得到了这个异常“对象 # 没有方法 'msToBlob'” 。谁能帮忙,这里有什么问题?