Closed Bug 913896 Opened 11 years ago Closed 11 years ago

Display audio (microphone) permission in permission acquisition prompt

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

Other
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+)

VERIFIED FIXED
blocking-b2g koi+

People

(Reporter: gasolin, Assigned: alive)

References

Details

Attachments

(4 files)

To support Display camera/ microphone permission acquisition prompt,

Permission Manager need to show the available device list get from gecko, with single select option box near it.
Assignee: nobody → gasolin
Blocks: 894848
blocking-b2g: --- → koi?
Depends on: 853356
Depends on: 898949
Summary: Display device list in permission acquisition prompt → Display audio (microphone) device list in permission acquisition prompt
Blocks: 914028
this bug will focus on audio device list.


UX please provide 

1. icon for Microphone Permissions
2. 'Microphone is on' image for top bar
3. 'Microphone is on' icon for navigation item
Flags: needinfo?(firefoxos-ux-bugzilla)
FYI, at the end there will be 3 kinds of getUserMedia permissions:

1. Microphone only
2. Camera only
3. Camera + Microphone
Summary: Display audio (microphone) device list in permission acquisition prompt → Display audio (microphone) permission in permission acquisition prompt
Current confirm button strings are "Don't allow" and "Allow".

In spec p15, said the button strings are 'Don’t Share' and 'Share'.

Should 'Share/Don't share' be applied to all permissions, or used only for microphone, camera inputs?
Matej, please advise on the expected standard strings here: do we use Allow and Don't allow or Share and Don't share? Thanks!
Flags: needinfo?(Mnovak)
I think it's always better for the button text to be as clear as possible. In this case, I prefer "Share" and "Don't share" since the user will know what they're doing. Thanks.
Flags: needinfo?(Mnovak)
Matej, you mean only use "Share" and "Don't share" for microphone, camera inputs, 
but not for geo location, fm radio...etc, right?
Flags: needinfo?(Mnovak)
(In reply to Fred Lin [:gasolin] from comment #6)
> Matej, you mean only use "Share" and "Don't share" for microphone, camera
> inputs, 
> but not for geo location, fm radio...etc, right?

I think if the action is sharing, it should always say so on the buttons. Why wouldn't we be consistent?
Flags: needinfo?(Mnovak)
Matej, thanks for feedback!
So I'd replace "Don't allow" and "Allow" to "Share" and "Don't share" for button text.
Depends on: 907075
Eric, could you help on provide images described in Comment 1 ?
Flags: needinfo?(ekr)
Fred: you mean what does it look like on Desktop?
Eric,

I found each kinds of permission has it own icon
https://github.com/mozilla-b2g/gaia/tree/master/apps/system/style/permission_manager/images

So basically I'd request have audio icon to fulfill this issue (better to provide video/media icons as well)

thanks!
Just checking on the UX need here: Are new icons needed, or do you need the existing icons (referenced above) in different sizes, etc?
new icons needed
blocking-b2g: koi? → koi+
WIP with default choice (and correspondent test cases) https://github.com/mozilla-b2g/gaia/pull/12098

@schien you can check if it works fine with your patch
Flags: needinfo?(schien)
Hi Fred - sorry, I'm still not clear on the icon request here. Please let me know which exact icons are needed (from comment #11), and how they need to be different from existing icons. I've also flagged Eric Pang to see if he can advise on details here.
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(epang)
sorry for unclear message. we need icons for permission prompt screen. 

* microphone capture
* camera capture
* microphone & camera capture

as shown in spec p11(video)/p13(microphone), but they might be in 'blue' color to align other permission icons
Attached image screenshot_need_icon
attach screenshot, we need new icon to replace this one described in spec p11
current lack correspondent icons, but due to schedule, I'd like send for review and replace icons before landing.
Attachment #803591 - Flags: review?(alive)
Comment on attachment 803591 [details]
pull request redirect to github

r+ if github comments are addressed.
Attachment #803591 - Flags: review?(alive) → review+
Attached file Permission Icons.zip
Permissions Icons attached
Flags: needinfo?(epang)
Thanks you eric for icons. 

Updated the PR and will land after some integration test.
Flags: needinfo?(ekr)
Thank you Eric! :)
Integration test fails because following JS error is shown after tapping the "Share" button, and Gecko doesn't receive mozContentEvent with correct detail attribute.

E/GeckoConsole(  688): [JavaScript Error: "this.showPermissionPrompt(...) is undefined" {file: "app://system.gaiamobile.org/js/permission_manager.js" line: 258}]
Flags: needinfo?(schien)
I still don't know why it's undefined from interpreting javascript in my brain. Need device to do more test..
alive, I missed to bind(this) while calling requestPermission in L142 ?

SC, thanks for the integration test!

normal permission Event format (what gecko will receive) is

`
{
  id: id,
  type: '....allow',
  remember: true
}
`
I think the format is different from what we got from gecko. (no detail attribute)

and current return ContentEvent after this patch will be

`
{
  id: id,
  type: '....allow',
  remember: true
  // media only
  choice: {
    "video-capture": "front",
    "audio-capture": ""
  }
}
`

where should 'detail' attribute come with?
Flags: needinfo?(schien)
'detail' attribute is the father attribute which hold the object passed to the initCustomEvent.[1] You need to use |initCustomEvent| instead of |new CustomeEvent| in your patch.[2]

[1] https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent
[2] https://github.com/mozilla-b2g/gaia/pull/12098/files#L1R161
Flags: needinfo?(schien)
Blocks: 916007
We need to complete this today, stealing.
Assignee: gasolin → alive
Part 2 - Fix custom event malfunction.
Attachment #804312 - Flags: review?(timdream)
Attachment #804312 - Flags: review?(timdream) → review+
master

https://github.com/mozilla-b2g/gaia/commit/26f30419ad2ba17383ad81cd2ba85e889bc2262b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Keywords: verifyme
QA Contact: jsmith
Verified through initial test pass of gUM. See dependencies on bug 894848 for potential followups.
Status: RESOLVED → VERIFIED
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: