Index: openacs-4/packages/proctoring-support/www/resources/proctoring.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/www/resources/Attic/proctoring.js,v diff -u -N -r1.1.2.9 -r1.1.2.10 --- openacs-4/packages/proctoring-support/www/resources/proctoring.js 29 Apr 2021 10:14:22 -0000 1.1.2.9 +++ openacs-4/packages/proctoring-support/www/resources/proctoring.js 20 Jan 2022 14:56:03 -0000 1.1.2.10 @@ -718,19 +718,15 @@ // In the future we might be stricter about black pictures... // if (this.isCanvasMonochrome(canvas)) { - // var err = "canvas is monochrome"; - // this.onMissingStreamHandler(streamName, err); - // return; + // throw "canvas is monochrome"; // } // Check that camera does not keep sending the same // picture over and over. if (streamName == "camera" && prevPicture != null && this.areCanvasEquals(canvas, prevPicture)) { - var err = "Camera is sending the same identical picture twice."; - this.onMissingStreamHandler(streamName, err); - return; + throw "Camera is sending the same identical picture twice."; } this.prevPictures[i] = this.cloneCanvas(canvas); @@ -798,8 +794,14 @@ } // For every configured video stream, take a picture for (var i = 0; i < this.streams.length; i++) { - if (this.videos[i]) { - this.takeShot(this.streams[i], this.mediaConf[this.streamNames[i]].grayscale); + try { + if (this.videos[i]) { + this.takeShot(this.streams[i], + this.mediaConf[this.streamNames[i]].grayscale); + } + } catch (e) { + this.onMissingStreamHandler(this.streamNames[i], e); + return; } } // Set the time to the next snapshot to a random interval