Skip to content

Commit

Permalink
fix: Use image/jpeg as MIME type for canvas.toBlob
Browse files Browse the repository at this point in the history
Retargeted. See microsoft#801.

Closes microsoft#801, microsoft#838.
  • Loading branch information
mloenow authored Aug 6, 2019
1 parent 44f9e4b commit 4da5784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/htmlFileReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class HtmlFileReader {
canvas.width = video.videoWidth;
const ctx = canvas.getContext("2d");
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
canvas.toBlob(resolve);
canvas.toBlob(resolve, "image/jpeg", 1.0);
};
video.onerror = reject;
if (refresh) {
Expand Down

0 comments on commit 4da5784

Please sign in to comment.