<!doctype html> <html> <head> <title>html5 capture test</title> </head> <body> <video autoplay id="myVideo"></video> <img src="" id="myImg"> <canvas style="display: none;" id="myCanvas"></canvas> <button id="capture" onclick="snapshot()">snapshot</button> <script> var video = document.getElementById("myVideo"); var canvas = document.getElementById("myCanvas"); var img = document.getElementById("myImg"); var ctx = canvas.getContext('2d'); var localMediaStream = null; var snapshot = function () { if (localMediaStream) { canvas.width = video.videoWidth; canvas.height = video.videoHeight; img.width = video.videoWidth; img.height = video.videoHeight; ctx.drawImage(video, 0, 0); document.getElementById("myImg").src = canvas.toDataURL('image/png'); } }; navigator.mozGetUserMedia( {video: true}, function (stream) { video.src = window.URL.createObjectURL(stream); localMediaStream = stream; video.play(); }, function () { alert('your browser does not support getUserMedia'); } ); </script> </body> </html>
相关推荐
camera驱动开发,Camera_for_RockChipSDK参考说明_v4.1
在linux下采集uvc camera mjpeg sample
h5调起摄像头拍人照,简单可用,兼容性强,适合前端用户适用,方便操作和调用,后端请使用自己的验证方式
原博客地址:https://blog.csdn.net/u010356768/article/details/95496462
RTSP camera aims to establish an Android platform as a streaming server for the device's camera output. In order to register for receiving the camera stream, the Real-Time streaming protocol (RTSP) is...
一个很简单的基于Mobile6.0的相机例子 Carmera sample 用VB.net做成 留给自己以后备用
java camera view for androidj ava camera view for android
Camera for FireMonkey 2.2 源码安装版, Uses DirectShow 9 API, Supports for Delphi/C++ Builder XE2 - 10.3 FireMonkey applications Supports Windows 32 and Windows 64
1.打开就预览 2. button用于控制是开启preview callback并保存为jpg
Winsoft_Camera_for_Android_3.5_Delphi_XE5_10.3_Cracked_Downloadly.ir.rar
三星Play Camera For XP 2.0.0.15
MIPI Alliance Specification for Camera Serial Interface 2 (CSI-2) Version 1.01.00 Revision 0.04 – 2 April 2009 Further
12.3MP Camera Module for Jetson Nano
用HTML5 写的可以直接获取用户的摄像头,可以直接嵌入系统中,可以直接打开,非常好用的 用HTML5 写的可以直接获取用户的摄像头,可以直接嵌入系统中,可以直接打开,非常好用的 用HTML5 写的可以直接获取用户的...
WINSOFT_Camera_for_Android_V2.4_for_DXE5-DXE8_D10-D10.2_Downloadly.ir.rar
Cameralink接口标准协议PDF注释版,1篇+ Cameralink协议讲解PPT,1篇+工业相机Cameralink接口技术手册PDF,1篇
unity摄像机控制系统源码Camera Controller 3.21 亲测可用,附带官方案例。... Leverage the motors that come with the Camera Controller or create your own camera motors for a truly unique experience.
camera D5M for DE2_115.pdf 用户手册
WINSOFT_Camera_for_V1.5_for_D2009-D2010_DXE-DXE8_D10-D10.2_Downloadly.ir.rar
A Generic Camera Model and Calibration Method for Conventional,Wide-Angle, and Fish-Eye Lenses