bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

currentChannel in sound_manager.js initialized to wrong value

RESOLVED DUPLICATE of bug 796492

Status

Firefox OS
Gaia::System
--
minor
RESOLVED DUPLICATE of bug 796492
5 years ago
5 years ago

People

(Reporter: Thomas B. Rücker [account mostly dormant], Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

At the time of creating this bug the following line
https://github.com/mozilla-b2g/gaia/blob/master/apps/system/js/sound_manager.js#L24
contains the following code:
  var currentChannel = 'notification';

I believe this to be wrong and it prevents me from fixing bug 796492 cleanly.
I've traced usage of "currentChannel" and there seems to be nothing using this during boot, so nothing can be relying on it being initialized as 'notification'.

Once the state of the variable has been changed for the first time, it will correctly switch between all documented values (https://wiki.mozilla.org/WebAPI/AudioChannels) and 'none'.

The fix is trivial:
  var currentChannel = 'none';
Blocks: 796492
Created attachment 724405 [details] [diff] [review]
Fix for the initial value of currentChannel (pull request)

Just what it says on the tin:
https://github.com/mozilla-b2g/gaia/pull/8620
Attachment #724405 - Flags: review?
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 796492
Attachment #724405 - Flags: review?
You need to log in before you can comment on or make changes to this bug.