AckerApple / ack-angular-webcam

MIT License
37 stars 19 forks source link

jscam_canvas_only.swf file is throwing 404 #48

Closed lkm1994 closed 6 years ago

lkm1994 commented 6 years ago

I tried ack-angular-webcam with Angular 4 and it was working fine with Google Chrome, Firefox, Internet Explorer, Edge, but 2 weeks before it stop working in Internet Explorer i tried to debug and found that jscam_canvas_only was throwing 404 in network console of IE. Below are the options i am providing.

this.options = { audio: false, video: true, width: 400, height: 320, fallbackMode: 'callback', fallbackQuality: 500, fallbackSrc: 'fallback/jscam_canvas_only', cameraType: 'back' };

AckerApple commented 6 years ago

A 404 in html means a file cannot be found. You have not configured yourself right which means your not following the docs right.

This library is in use by many. It works.

You have no real github icon, no real name, and you’re looking for a hand out that you could help yourself to by reading the docs

No hand holding here. Good luck

AckerApple commented 6 years ago

I like the github icon! Great to see your face

https://www.npmjs.com/package/ack-angular-webcam#flash-fallback

AckerApple commented 6 years ago

The demo app, defines its options as such: https://github.com/AckerApple/ack-angular-webcam/blob/master/example/app/app.component.ts#L30

And then the demo fallback swf file is here: https://github.com/AckerApple/ack-angular-webcam/tree/master/example/app/fallback

Put two and two together and I forsee you will find your way

lkm1994 commented 6 years ago

Thanks for your input but i still have the same problem. In IE request is made for Jscam_canvas_only.swf where "content type" = "text/HTML", I think it should be application/x-shockwave-flash that is why it is giving 404 .

Thank you in advance.

AckerApple commented 6 years ago

Did you copy paste the swf from ack-angular-webcam to a location your server can serve?

This is simple stuff here. It’s not a problem with in this package. Based on several pieces of evidence of your newness, I’m certain you don’t understand how an swf fallback file works.

And who cares about Internet Explorer. Let it go man.

lkm1994 commented 6 years ago

Thanks a lot @AckerApple and yes i don't understand how an swf fallback file works but now i have some thing Thanks to you.

AckerApple commented 6 years ago

Please close this issue when you are done.

Because of my free code and knowledge I have given to you, I have a special request of you: Please document how you fixed your issue. As if you are writing to yourself in the past when you didn’t know what to do. Document the steps you took to make your swf file available.

If you document how you fixed your issue, clear enough, I will put it in the documentation of this package for furture adopters to read. You can put it right here in this chat

lkm1994 commented 6 years ago

In IE request is made for Jscam_canvas_only.swf where "content type" = "text/HTML", it should be application/x-shockwave-flash that is why it is giving 404. Since the Server didn't serve the folder in which Jscam_canvas_only.swf was present it was taking content type as defalut "text/HTML".

To Solve this Issue steps taken were. 1- Check if the file jscam_canvas_only.swf present in node_modules/ack-angular-webcam folder is accessible from server or not. 2- If Yes then check your fallbackSrc, if No then copy your jscam_canvas_only.swf to any folder that is accessible to server for example i copied in assets folder.