mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
convert uploaded images to webp
This commit is contained in:
@ -164,7 +164,7 @@
|
||||
/* Stop camera */
|
||||
this.video.pause()
|
||||
this.video.srcObject.getTracks().forEach((track) => {
|
||||
if (track.readyState == 'live') {
|
||||
if (track.readyState === 'live') {
|
||||
track.stop();
|
||||
}
|
||||
});
|
||||
@ -172,8 +172,8 @@
|
||||
canvas.toBlob((blob) => {
|
||||
let file = new File(
|
||||
[blob],
|
||||
"{% trans %}captured{% endtrans %}.png",
|
||||
{ type: "image/jpeg" },
|
||||
"{% trans %}captured{% endtrans %}.webp",
|
||||
{ type: "image/webp" },
|
||||
);
|
||||
|
||||
let list = new DataTransfer();
|
||||
|
Reference in New Issue
Block a user