Take a picture with mobile using javascript

后端 未结 1 1061
不知归路
不知归路 2021-02-20 00:20

I\'m looking for a way to take a picture with a phone/tablet on my website, the behavior should be :

  • The user click a \"camera\" button.
  • The mobile camera
1条回答
  •  Happy的楠姐
    2021-02-20 00:49

    You can use the HTML5 getUserMedia() API, which is explained in this article: http://www.html5rocks.com/en/tutorials/getusermedia/intro/

    Be careful: not all browsers support this (yet). For a detailed list of supporting browsers, take a look at this page: http://caniuse.com/#feat=stream

    0 讨论(0)
提交回复
热议问题