Browser compatibility issues punch camera

The reason: IE8 and below do not support HTML5 tags: video and canvas; IE11 and all of the following versions, including the Edge do not support getUserMedia (). 

Want compatible with IE browsers can only use Flash.

Solution
Program a
flash + as3.0 + swfobject achieve camera, camera
program analysis:
1, making use adobe flash + actionscript swf files;
2, using plug-ins to achieve swfobject.js page calls swf file.
There is an especially well-written blog: flash + as3.0 + swfobject achieve camera to take pictures

This custom swf file ,, you still have to learn actionscript and to install adobe flash CS6 ,.

So I thought since there swfobject package plug-ins can be more easily insert flash. Camera jQuery plugin "jquery-webcam-plugin".

Scheme II
jquery-webcam-plugin + canvas + spooler
program Analysis:

Use jquery-webcam-plugin display local camera.
After clicking the camera button,
(A) above and for IE9: after a call by the camera flash, the image is directly output to the canvas in the canvas, and then the toDataURL () method for generating an image by a background canvas base64 encoded transmitted Method.
(B) for IE8 and below: Because IE8 can not be canvas.toDataURL (), and therefore can not be directly after taking the picture is displayed. At this call by the camera flash, the resulting pixel matrix transmitted back, so that background processing, generates a base64 encoded image, then the front.

Guess you like

Origin www.cnblogs.com/ziyandeyanhuo/p/11004763.html