- From: cowwoc <cowwoc@bbs.darktech.org>
- Date: Sat, 14 Dec 2013 10:44:12 -0500
- To: Martin Thomson <martin.thomson@gmail.com>
- CC: Jan-Ivar Bruaroey <jib@mozilla.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
On 13/12/2013 7:46 PM, Martin Thomson wrote:
> On 13 December 2013 15:25, cowwoc <cowwoc@bbs.darktech.org> wrote:
>> var properties = { width: resolution.width, height: resolution.height,
>> frameRate: 20 }; // specific values that the device must support (ranges are
>> not accepted)
>> getUserMedia(properties, onSuccess, onFailure);
> That doesn't play well with others. How do you propose to handle the
> case where multiple sites (or even scripts in the same page) want to
> access the device at the same time?
Hi Martin,
In the first line of code (var modes = camera.getModes()) the device
would return the only mode that is available (meaning, the one that the
camera is already opened with). If you then add device.isOpen() to check
for this condition, applications can display a more user-friendly error
message when this occurs:
"This application requires resolution X but you've already opened the
camera with resolution Y in another application"
Gili
Received on Saturday, 14 December 2013 15:45:08 UTC