RE: Setting for camera Allow/Deny

I'm hoping that UAs will move to a system where there's no need for a deny widget.

Instead, an application does:

navigator.media.capturePicture(function this_can_be_called_by_the_ua_many_times(blob) {
  // do something with blob
}, function this_will_only_be_called_once_if_or_when_the_ua_and_or_user_agree_to_call_it(err) {
  // show error message, or flash based fallback ;)
});

The UA then can paint something [1]. Clicking the camera icon could show a doorhanger UI [2]. Clicking the camera button in that UI doesn't have to close the doorhanger. Instead it could just deliver the picture to this_can_be_called_by_the_ua_many_times - if the user clicks the camera in the doorhanger multiple times, then the function will be called once per click.

The number of permission requests you get in this UI is approximately 0. At least for your standard definition of a "permission request". Your average physical camera requires the same number of clicks:

#1 turn on camera/open shutter
#2 take first picture
#3 take second picture

The same would work with the UI above.

Now, if a page doesn't want to accept a second picture, it could unregister its event handler (kinda hard using the capturePicture method described here, and an argument against that notation). Or, if we keep this poor API, it could navigate to a new page which doesn't have the registration (stupid workaround for bad API, but it'd work) - at which point the door hanger entry point would go away, and the UI hanging from the doorhanger should fall away since there's nothing from which it would hang.

To continue with my UI.... If the user wants to take one picture, comment on it, and take another picture. Let's consider the real world (I was just in Boston taking pictures).

Use case: 2 shots, first is poor

With a real camera:
#1 turn on camera/open shutter
#2 take picture
#3 turn off camera
#4 review picture; delete picture
#5 turn on camera/open shutter
#6 take picture
#7 turn off camera
#8 review picture

Step #5 is sort of interesting. Not all of my pictures came out very well. Sometimes I actually wanted to delete them immediately. Normally I didn't care.

With a web app:
#1 tap doorhanger
#2 take picture
#3 tap outside door hanger --- this is if we assume that pictures are *immediately* sent to the web app
#4 tap web app UI to delete picture
#5 tap doorhanger
#6 take picture
#7 tap outside door hanger --- this is if we assume that pictures are *immediately* sent to the web app
#8 review picture

The number of steps here is actually equal, which is great.

Use case: 3 shots, all are good

With a real camera:
#1 turn on camera/open shutter
#2 take picture
#3 glance at saved picture
#4 take picture
#5 glance at saved picture
#6 take picture
#7 turn off camera
#8 review pictures

With a web app:
#1 tap doorhanger
#2 take picture
#3 glance at saved picture
#4 take picture
#5 glance at saved picture
#6 take picture
#7 tap outside door hanger --- this is if we assume that pictures are *immediately* sent to the web app
#8 review pictures

You could offer a UI where there's a way to stop a picture from being sent to the web page as part of step 3. In fact, I more or less have this ability with a real camera, so doing the same with a UA makes a lot of sense.

I'm not going to draw that UI now. The UI attached here is just a rough sketch (That took too long to do using MS Paint on Windows 7). For reference, the background is really the content YouTube was serving on its home page. The random icons were picked from other places and munged considerably to fit.

PLEASE DO NOT assume that the UI you see today in a User Agent is the final UI that we will live with for the next 5 or 10 years. Browsers can and do evolve. What you're experiencing today is merely someone's first draft at a UI to test things. Feedback and UI work is taken and done in parallel to everything else. This is much better than designing everything up front (and getting it wrong) and delaying first access to features by years (or decades).

[1] http://lists.w3.org/Archives/Public/www-archive/2012Mar/att-0021/button_to_trigger_camera_ui.png
[2] http://lists.w3.org/Archives/Public/www-archive/2012Mar/att-0021/camera_ui_as_a_door_hanger.png


---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Received on Wednesday, 14 March 2012 14:47:04 UTC