onemightyroar / angular-camera

Angular directive for easy webcam capture
GNU General Public License v2.0
62 stars 30 forks source link

Camera not showing anymore after update on Firefox #25

Open DouglasWaltricke opened 5 years ago

DouglasWaltricke commented 5 years ago

After a update on firefox that recently was applied in chrome too, the camera doest not work anymore.

Probably because of this: https://www.fxsitecompat.com/en-CA/docs/2018/url-createobjecturl-no-longer-accepts-mediastream-as-argument/

Can someone help-me ?

On the line 41 the method deprecated is being used:

`scope.enableCamera = function () { return navigator.getUserMedia({ audio: false, video: true }, function (stream) { return scope.$apply(function () { scope.stream = stream; scope.isLoaded = true; 41 return scope.videoStream = $sce.trustAsResourceUrl(window.URL.createObjectURL(stream)); }); }, function (error) { return scope.$apply(function () { scope.isLoaded = true; return scope.noCamera = true; }); });

zachdunn commented 5 years ago

Hi Doug! This project was written for an older version of Angular and isn't something we actively maintain anymore. While you can probably fork a version with updates, I'd bet there's something more modern out there for React or newer versions of Angular.

alinoudev commented 5 years ago

@DouglasWaltricke Try this code file and see if it helps http://hfhphilly.healthyhomemanager.net/app/services/directives/vendors/camera/angular-camera.js