Commit 6fe24359 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: minor changes

parent beca9c4a
......@@ -128,7 +128,6 @@
.push(undefined, function (error) {
if (!(error instanceof RSVP.CancellationError)) {
canceller();
reject(error);
}
});
}
......@@ -155,7 +154,6 @@
canvas = gadget.querySelector(".canvas");
photo = gadget.querySelector(".photo");
photoInput = gadget.querySelector(".photoInput");
return handleUserMedia(device_id, gotStream);
}
......@@ -203,10 +201,13 @@
if (device.kind === 'videoinput') {
el = document.createElement("option");
el.value = device.deviceId;
el.innerText = device.label;
el.innerText = device.label || device.kind + " " + device.deviceId;
selector.appendChild(el);
}
}
if (len === 1 && selector.options.length === 2) {
selector.options[1].selected = true;
}
});
})
.declareMethod('getContent', function () {
......
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