Don't evaluate onWebcamLoaded more than once

Firefox for some reason keeps triggering the event and we don't want to
do unnecessary work on each trigger (and flood the log with debug
statements).
This commit is contained in:
Gina Häußge 2017-10-23 13:49:33 +02:00
parent 4439f5aad0
commit 4b3d883639

View file

@ -402,6 +402,8 @@ $(function() {
};
self.onWebcamLoaded = function() {
if (self.webcamLoaded()) return;
log.debug("Webcam stream loaded");
self.webcamLoaded(true);
self.webcamError(false);