thenickdude / webm-writer-js

JavaScript-based WebM video encoder for Google Chrome
277 stars 43 forks source link

Fix quality parameter for getDataURL() #5

Closed tomka closed 5 years ago

tomka commented 5 years ago

According to the documentation [1] the function canvas.getDataURL() takes a quality level as second parameter. It is expected that this parameter is a number in the range [0,1] rather than an object. This wasn't visible as an error, because the documentation also says: "If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored."

[1] https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL

thenickdude commented 5 years ago

Thanks, I'm not sure how I let that one slip by me!