Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#6425 closed enhancement (fixed)

Avatar screen: Remove "Camera" tab if webcam not supported

Reported by: r-a-y's profile r-a-y Owned by: imath's profile imath
Milestone: 2.3 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch ux-feedback dev-feedback commit
Cc:

Description

This is a follow-up to #6290.

Ideally, if a webcam is not attached to the computer or if the browser does not support getUserMedia, we should remove the "Camera" tab from view.

I've attached a patch that addresses this, but the caveat is for those browsers / devices that support webcams, the browser will show the "SITE wants to use your camera" prompt even on the "Upload" tab.

With this patch, the pro is browsers that do not support webcams or do not have webcams attached to their com will not see the "Camera" tab. The con is those with webcams will see the browser's "wants to use your camera" prompt even on the avatar's "Upload" tab. This could annoy people, which is why I'm not sure if this issue is worth addressing.

Attachments (3)

6425.01.patch (1.1 KB) - added by r-a-y 9 years ago.
6425.02.patch (3.6 KB) - added by r-a-y 9 years ago.
6245.03.patch (4.1 KB) - added by imath 9 years ago.

Download all attachments as: .zip

Change History (13)

@r-a-y
9 years ago

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.


9 years ago

#2 @imath
9 years ago

I think this is not a good idea

The con is those with webcams will see the browser's "wants to use your camera" prompt even on the avatar's "Upload" tab. This could annoy people, which is why I'm not sure if this issue is worth addressing.

That's not acceptable.

  1. I think it's important to inform the problem comes from the browser they are using, i'd be more happy to add a link about getUserMedia support, so that it's easier for a member to see what browser to use to get the feature.
  2. Admins can disable the tab using add_filter( 'bp_avatar_use_webcam', '__return_false' ); at any time if they don't feel comfortable with the new feature.
  3. If we are to do this (which is from my point of view a bad idea), this should be fixed on the server part to avoid the script to be loaded like i'm doing with wp_is_mobile() (see the bp_avatar_use_webcam() function). WordPress is giving us some globals like $is_IE we could use as this feature only works on Chrome and Firefox.

#3 @r-a-y
9 years ago

  • Keywords 2nd-opinion removed

I think this is not a good idea

Yeah, after thinking things through. I agree.

These are all the possible webcam scenarios:

  1. A user has Firefox / Chrome and has a webcam
  2. A user has Firefox / Chrome, but does not have a webcam
  3. A user has IE and has a webcam
  4. A user has IE and does not have a webcam

modemlooper was discussing point 3; I was mostly talking about 2.

For 2, instead of 01.patch, we just need to improve the labels.

For example, Twitter has a "Take Photo" option and when you click on it and if you do not have a webcam or if you do not give permission, this is the message that pops up:

Uh oh...it looks like you don't have a webcam or we were unable to get permission to use your webcam. Please close this window and upload a photo instead.

I'd also propose to change our tab names to from "Upload" and "Camera" to "Upload Photo" and "Take Photo".

For 3 and 4, let's do what you recommend by not loading the webcam JS when IE is detected.

For Twitter, the "Take Photo" option does not show up in IE. So for BP, I'd be okay with not loading the webcam JS if IE is detected. The only thing to worry about is when Microsoft Edge is released.

With that said, 02.patch changes the various labels and messages to make things a little clearer and also bails out of bp_avatar_use_webcam() if IE is detected via WP's $is_IE as you stated, imath.

Let me know what you think.


If we are to do this (which is from my point of view a bad idea), this should be fixed on the server part to avoid the script to be loaded like i'm doing with wp_is_mobile() (see the bp_avatar_use_webcam() function).

I was able to use the webcam for Firefox on Android even with wp_is_mobile(), but that's probably because I was using a user-agent plugin :)

@r-a-y
9 years ago

#4 @imath
9 years ago

  • Keywords dev-feedback added

Thanks for 02.patch r-a-y.

  1. I think we shouldn't change the name of the Upload nav as :
  • potentially this could be used for Sites "logo" in #6026
  • Users can send any image file, not only a photo.
  • to be consistent we would have to also change the name of the delete nav for "Delete Photo"
  1. Although i understand your point and the one of modemlooper, i'm really against disabling the camera feature for browsers like Internet Explorer. Because:
  • as you mentioned in your comment in your patch, this is something we'll need to check in the future as Microsoft Edge seems to support it.
  • A user has no chance to be aware he could use the feature by switching to a browser that supports it :(
  • For Intranet users stuck with an old version of Internet Explorer, the administrator can make this choice by using the filter to disable the camera feature.
  1. Thanks a lot for improving the camera feature "warning" strings. I agree it's a great improvement.
  1. I've put up a test drive for this feature and registered each member of the team: http://imath-buddypress.wpserveur.net i've just updated BuddyPress to 2.3-beta, so if you need to test it with the mobile devices, feel free to do it: you have an account :)

I've just tested the iPhone on this test drive and this is the UI, as you can see no "camera tab".
https://farm8.staticflickr.com/7704/17420134961_ddeb7cbf3b.jpg

About point 2. I'd really like to have other opinions, in particular @boonebgorges 's one as he was the author of this ticket #5548. Imho the warning "Your browser does not support this feature." is a good way to help people switch to a browser supporting it if they have this opportunity.

If the majority of us thinks we should completely disallow the "Take Photo" (camera) tab for browsers that do not support getUserMedia, then i'll surrender :)

But then, we should be consistent and also disallow the tab in case the browser is Safari. So 03.patch is 02.patch with my suggestions :

  • Keep the Upload tab name the way it is
  • Use your suggestions for the camera strings "Take Photo" + warnings improvements
  • include a check on $is_safari. I secretly hope this last part won't make it :)
Last edited 9 years ago by imath (previous) (diff)

@imath
9 years ago

#5 @boonebgorges
9 years ago

Keep the Upload tab name the way it is
Use your suggestions for the camera strings "Take Photo" + warnings improvements

+1 to these.

About point 2. I'd really like to have other opinions, in particular @boonebgorges 's one as he was the author of this ticket #5548. Imho the warning "Your browser does not support this feature." is a good way to help people switch to a browser supporting it if they have this opportunity.

I'd venture to say that most people using Safari or IE fall into one of the following categories:

  1. People who don't have control over what browser their computer runs (this is mostly IE).
  2. People who use whatever their compute came with. These people don't know what a "browser" is.
  3. People who have chosen a browser for a specific, principled reason (I know people who use Safari for reasons like this)

In each of these cases, urging the user to switch to another browser is not very helpful. For (a), the user cannot switch. For (b) and (c), the user will not switch.

Even for those users who may be succeptible to switching, we need to provide better UX here if we want our suggestions to work. Something like http://browsehappy.com/ is nice, but it doesn't tell us which browsers support camera uploads. At the very least, the "your browser doesn't support this feature" message should include something to the effect of "Please use the Upload tab instead".

So, while I sympathize in theory with imath's desire to get people to switch to better browsers, I think that in practice, a non-functional tab is going to be an annoyance for most people. My vote is to hide it for Safari and IE, as suggested in 03.patch. (Sorry imath :) )

#6 @imath
9 years ago

3 - 1 : i'm surrending :)

@r-a-y : i'm fine with 03.patch to be committed

#7 @r-a-y
9 years ago

  • Keywords commit added

Glad we could all have this discussion!

#8 @DJPaul
9 years ago

Let's get this in before next week's dev chat please.

#9 @imath
9 years ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 9860:

Avatar UI : improve the camera feature

  • Change the name of the tab: "Camera" is now replaced by "Take Photo"
  • Improve the user feedback messages
  • Completely disable the feature for Internet Explorer and Safari as they do not support getUserMedia.

Props r-a-y, boonebgorges.

Fixes #6425

#10 @DJPaul
8 years ago

  • Component changed from API to Core
Note: See TracTickets for help on using tickets.