mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-13 05:31:37 +08:00
Added checks to avoid 404 error
Added a check to avoid a 404 error which happened if the user didn’t automatically accept webcam access. The `src` attribute of the `video` tag was set to `undefined`, which led to a 404 error on the URL `http://domain.tld/path_with_scanner/undefined`. It is now just set to an empty string.
This commit is contained in:
Vendored
+1
-1
@@ -1409,7 +1409,7 @@ define('input_stream',["image_loader"], function(ImageLoader) {
|
|||||||
|
|
||||||
that.setInputStream = function(config) {
|
that.setInputStream = function(config) {
|
||||||
_config = config;
|
_config = config;
|
||||||
video.src = config.src;
|
video.src = (typeof config.src !== 'undefined') ? config.src : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
that.ended = function() {
|
that.ended = function() {
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ define(["image_loader"], function(ImageLoader) {
|
|||||||
|
|
||||||
that.setInputStream = function(config) {
|
that.setInputStream = function(config) {
|
||||||
_config = config;
|
_config = config;
|
||||||
video.src = config.src;
|
video.src = (typeof config.src !== 'undefined') ? config.src : '';
|
||||||
};
|
};
|
||||||
|
|
||||||
that.ended = function() {
|
that.ended = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user