我正在编写html5/angular应用,希望能够从应用程序中访问移动后置摄像头。我使用了<input type="file" accept="image/*" capture="camera" />
,但它总是打开前置摄像头而不是后置摄像头,有没有办法始终打开后置摄像头?
我正在编写html5/angular应用,希望能够从应用程序中访问移动后置摄像头。我使用了<input type="file" accept="image/*" capture="camera" />
,但它总是打开前置摄像头而不是后置摄像头,有没有办法始终打开后置摄像头?
<input type="file" accept="image/*" capture="environment">
前置摄像头,您应该能够使用:capture="user"
或只使用capture。
如果您愿意,您可以在此处阅读更多信息:https://developers.google.com/web/fundamentals/media/capturing-images/