AckerApple / ack-angular-webcam

MIT License
37 stars 19 forks source link

If user press Block camera , catch emitter not working properly #26

Closed kk4fun closed 6 years ago

kk4fun commented 6 years ago

Hi. I have to make user photo from web cam. So when i press allow , all is working properly. But when i press Block on Block/Allow camera permission popup i have an uncaught error in console and no error data in error object.

Error is

image

public onCameraError(error: Error): void {
        // .... my code....
    }

Camera declaration in html

<ack-webcam class="take-photo-page-container-webcam"
                            [(ref)]="webcam"
                            [options]="webcamOptions"
                            (success)="onCameraSuccess($event)"
                            (catch)="onCameraError($event)">
  </ack-webcam>

My web cam options object

this.webcamOptions = {
            audio: false,
            fallbackSrc: 'fallback/jscam_canvas_only.swf',
            height: 400,
            video: false,
            width: 400,
        };

What should i do? Thanks.

Browser Chrome Version 63.0.3239.132 (Official Build) (64-bit) Framework - Angular 5

AckerApple commented 6 years ago

Hey hey. I’m so soulfully pleased when I see this code used. Yeah, I think we can fix this.

So this thing has not yet been wired to do what you are asking for, yet. Simply that. Let’s duet together!

You can either try and fix the code and issue a pull request OR wait for me to fix. I’m a little busy but maybe I can squeeze this in today. I bet where ever getUserMedia is called, we need to chain a catch call.

Help motivate me by liking, star’ing, following or whatever gesture you could do to boost popularity of this package on any/all distributions of it

AckerApple commented 6 years ago

Fixed . Install latest version of ack-webcam. Please test and close issue when satisfied.

AckerApple commented 6 years ago

Yoo I accidentally closed this issue. Reopen if you have an issues

kk4fun commented 6 years ago

@AckerApple Hi. According to github rules I cannot re-open your own issues if a repo collaborator closed them :) So, please reopen it by yourself. I've updated to 1.7.3 version , but unfortunately result is almost the same. Almost - error object now is undefined.