Commit 51353ae0 authored by Romain Courteaud's avatar Romain Courteaud

erp5_document_scanner: display the last video frame

parent c7464a14
......@@ -551,11 +551,13 @@
image_capture = new window.ImageCapture(
gadget.element.querySelector('video').srcObject.getVideoTracks()[0]
),
original_blob_url,
blob_url,
original_width,
original_height;
// Display last video frame while doing calculation
gadget.element.querySelector('video').pause();
return new RSVP.Queue()
.push(function () {
btn.classList.remove("ui-icon-circle");
......@@ -573,13 +575,6 @@
})
.push(function (blob) {
gadget.detached_promise_dict.media_stream.cancel('Not needed anymore, as captured');
// Display photo while doing calculation
original_blob_url = URL.createObjectURL(blob);
var img = domsugar("img", {"src": original_blob_url}),
div = gadget.element.querySelector(".camera-input");
div.replaceChild(img, div.firstElementChild);
return resizePhoto(blob, original_width, original_height);
})
.push(function (blob) {
......@@ -641,7 +636,6 @@
})
.push(function (cropper) {
URL.revokeObjectURL(blob_url);
URL.revokeObjectURL(original_blob_url);
gadget.cropper = cropper;
});
}
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>982.58333.43653.1348</string> </value>
<value> <string>982.58354.63381.1604</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1585649164.66</float>
<float>1585650508.06</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment