Re: subscribe access “back” acamera with html5 on android phone

Currently, only front camera is selected for getUserMedia in Chrome on
Android. Stay tuned for future development.

Wei


On Sun, Jun 2, 2013 at 7:26 AM, é£Žå° <zjqzxfl008@gmail.com> wrote:

> Hi,  When I use html5 'getUserMedia' API to access acamera on the
> android(4.0) phone, it comes out "front camera", but I want to open "back
> camera".  browser is chrome26. JavaScript code:
> window.URL = window.URL || window.webkitURL || window.msURL
> || window.oURL;
> // Normalizes navigator.getUserMedia
>  navigator.getUserMedia = navigator.getUserMedia
> || navigator.webkitGetUserMedia
> || navigator.mozGetUserMedia || navigator.msGetUserMedia;
>
> var contraints = {
>  /*   mandatory: {
>     width: { min: 640 },
>     height: { min: 480 }
>   }, */
>   optional: [
>     { width: 650 },
>     { width: { min: 640 }},
>     { frameRate: 60 },
>     { width: { max: 800 }},
>     { facingMode: "environment" }
>   ]
>  };
> navigator.getUserMedia({video:contraints}, successsCallback,
> errorCallback);
>
> I don't know how to access specific camera on android phone. Can you help
> me, sorry ,My english is poor ,thanks^_^
>

Received on Sunday, 2 June 2013 23:48:56 UTC