利用ezVidC60.ocx在网页上做摄像头采集照片,以前没做过不知咋整,网上下的一段代码.
调试的时候http:-//localhost/......可以成功,发布之后换成http:-//192.168.1.111/......就不行了(同一台电脑)
<tr>
<td style="height: 378;border-color:#ffffff; width:35%;" align="center">
<object id="Form1_vd" height="378" width="283" classid="CLSid:DF6D6569-5B0C-11D3-9396-008029E9B3A6"
name="Form1_vd" viewastext>
<param name="_ExtentX" value="8467">
<param name="_ExtentY" value="6350">
<param name="AutoSize" value="0">
<param name="CenterVideo" value="-1">
<param name="BackColor" value="-2147483643">
<param name="BorderStyle" value="1">
<param name="VideoBorder" value="1">
<param name="DriverIndex" value="0">
<param name="Preview" value="-1">
<param name="PreviewRate" value="15">
<param name="Overlay" value="0">
<param name="StretchPreview" value="0">
<param name="CancelKey" value="0">
<param name="CaptureRate" value="66666">
<param name="MakeUserConfirmCapture" value="-1">
<param name="PercentDropForError" value="10">
<param name="CaptureViaBackgroundThread" value="0">
<param name="IndexSize" value="27000">
<param name="CaptureAudio" value="0">
<param name="AbortLeftMouse" value="-1">
<param name="AbortRightMouse" value="-1">
<param name="TimeLimitEnabled" value="0">
<param name="TimeLimit" value="30">
<param name="StreamMaster" value="0">
<param name="YieldEventEnabled" value="0">
<param name="FrameEventEnabled" value="0">
<param name="VideoStreamEventEnabled" value="0">
<param name="WaveStreamEventEnabled" value="0">
<param name="UsePreciseCaptureControls" value="0">
<embed src="8467" width="283" height="378" _extentx="8467" _extenty="6350" autosize="-1"
centervideo="-1" backcolor="-2147483643" borderstyle="1" videoborder="1" driverindex="0"
preview="-1" previewrate="15" overlay="0" stretchpreview="0" cancelkey="0" capturerate="66666"
makeuserconfirmcapture="-1" percentdropforerror="10" captureviabackgroundthread="0"
indexsize="27000" captureaudio="0" abortleftmouse="-1" abortrightmouse="-1" timelimitenabled="0"
timelimit="30" streammaster="0" yieldeventenabled="0" frameeventenabled="0" videostreameventenabled="0"
wavestreameventenabled="0" useprecisecapturecontrols="0">
</embed>
</object>
</td>
<td style="width:35%;" align="center">
<img id="imgPhoto" width="283" height="378" runat="server" />
</td>
</tr>
<tr>
<td style="height: 36px" align="middle" colspan="3">
<font face="宋体">
<input onclick="catchone();" type="button" value="照 相" /></font>
<input id="btnSave" value=" 保 存" type="button" onclick="SavePicture();" />
<input type="button" onclick="javascript:window.close();" value="关 闭" />
</td>
</tr>用360浏览器就OK