Commit 5b2aea23 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: Display video again after capture image

parent fd65e53a
......@@ -155,6 +155,14 @@
.push(function (element) {
root = element;
selector = element.querySelector("select");
if (!selector.value && video) {
video.pause();
}
if (selector.value) {
root.querySelector(".camera-input").style.display = "";
root.querySelector(".capture-button").style.display = "";
root.querySelector(".camera-output").style.display = "none";
}
if (!navigator.mediaDevices) {
throw ("mediaDevices is not supported");
}
......@@ -185,7 +193,7 @@
if (evt.target.type == "select-one") {
return this.getElement()
.push(function (root) {
if (video) {
if (!evt.target.value && video) {
video.pause();
}
root.querySelector(".camera-input").style.display = "";
......
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