Javascript 如何解决移动浏览器中设备摄像头不支持的问题
我已经创建了一个React Js web应用程序;使用对话框组件打开相机并捕获实时图像。这在桌面浏览器中效果很好,但在手机和苹果设备中效果不佳。但在Safari浏览器中,它工作得非常好。我如何在其他浏览器中也能做到这一点Javascript 如何解决移动浏览器中设备摄像头不支持的问题,javascript,android,reactjs,google-chrome,mobile-safari,Javascript,Android,Reactjs,Google Chrome,Mobile Safari,我已经创建了一个React Js web应用程序;使用对话框组件打开相机并捕获实时图像。这在桌面浏览器中效果很好,但在手机和苹果设备中效果不佳。但在Safari浏览器中,它工作得非常好。我如何在其他浏览器中也能做到这一点 <Dialog fullScreen={fullScreen} open={this.state.open}
<Dialog
fullScreen={fullScreen}
open={this.state.open}
onClose={this.handleClose}
aria-labelledby="responsive-dialog-title">
<DialogTitle className={"testClassForStyle"} id="responsive-dialog-title">{<Translate
id={"webCam"}></Translate>}</DialogTitle>
<DialogContent className={"camscreen"}>
<div className={"webCamCss"}>
<center><Webcam
audio={false}
height={200}
ref={this.setRef}
screenshotFormat="image/jpeg"
width={350}/></center>
<center><Button onClick={this.capture} className="btn-success text-white">
<Translate
id={"capture"}></Translate></Button></center>
</div>
</DialogContent>
<DialogActions id="actions-btns">
<Button onClick={this.handleClose} className="btn btn-default text-white" autoFocus>
<Translate id={"cancel"}></Translate>
</Button>
<Button onClick={this.handleAddClose} className="btn btn-primary text-white">
<Translate id={"addBtn"}></Translate>
</Button>
</DialogActions>
</Dialog>
{}