canvas.toDataURL() Security Error The operation is insecure

前端 未结 7 2179
时光取名叫无心
时光取名叫无心 2020-12-03 02:37

When I am trying to get a screenshot and save it as PNG before uploading video to server, I am having the following problem

7条回答
  •  温柔的废话
    2020-12-03 03:15

    In docs toDataURL("data:image/png;") apparently not documented:

    • https://developer.mozilla.org/pt-BR/docs/Web/API/HTMLCanvasElement
    • http://msdn.microsoft.com/en-us/library/ie/ff975241%28v=vs.85%29.aspx

    Try replace .toDataURL("data:image/png;"); by .toDataURL("image/png");

提交回复
热议问题