Closed Bug 727728 Opened 12 years ago Closed 12 years ago

Support volume change

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: fabrice, Assigned: fabrice)

Details

Attachments

(1 file)

Currently the volume is always at 1 (max).
Attached patch patchSplinter Review
Changes the volume in 1/20 steps. Works fine when watching videos from the video app.
Assignee: nobody → fabrice
Attachment #597701 - Flags: review?(21)
(In reply to Fabrice Desré [:fabrice] from comment #0)
> Currently the volume is always at 1 (max).

I don't think this actually gets applied currently, because volume in video is definitely below what the speakers are capable of.
Comment on attachment 597701 [details] [diff] [review]
patch

Nice! 

>+  changeVolume: function shell_changeVolume(aDelta) {
>+    let audioManager = Cc["@mozilla.org/telephony/audiomanager;1"].getService(Ci.nsIAudioManager);

nit: overlong line?

>+          case 'VolumeUp':
>+            this.changeVolume(0.05);
>+            break;
>+          case 'VolumeDown':
>+            this.changeVolume(-0.05);
>+            break;

nit: would be nice to have that increment/decrement const'ed.

Also, 20 steps is quite a lot. I don't know of any UI that has that many steps. 10 might be enough. Just sayin'.
> Also, 20 steps is quite a lot. I don't know of any UI that has that many
> steps. 10 might be enough. Just sayin'.

I tend to agree on that. 20 steps seems a bit too much.

What about a pref, so the rest of the world will be able to tweak it if they prefer less or more.
https://hg.mozilla.org/integration/mozilla-inbound/rev/32d556a79784

using the "media.volume.steps" pref that defaults to 10.
https://hg.mozilla.org/mozilla-central/rev/32d556a79784
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: