default beep doesn't work -- "@mozilla.org/sound;1","nsISound"))().beep()

NEW
Unassigned

Status

()

Core
Widget: Cocoa
9 years ago
6 years ago

People

(Reporter: Cathy Vaughn, Unassigned)

Tracking

({regression})

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0
Build Identifier: Mozilla Firefox 3.0

I have Yahoo Mail Notifier extension installed. It highlights the New Mail icon and plays a System Default alert beep when new Yahoo Mail arrives. 
However, since I updated to Firefox 3, the System Default Mail alert has stopped playing. 

Reproducible: Always

Steps to Reproduce:
1.Open Firefox 3 application.
2. Yahoo Mail Home page loads.

Actual Results:  
New Mail icon is highlighted and shows correct new mail counter, but system default alert for new mail does not play.

Expected Results:  
Play the System Default alert beep telling me New Mail has arrived.

Comment 1

9 years ago
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1

from the Extension:
Note: In Firefox 3.0, either 3rd party cookies must be enabled or there must be an "allow" exception for yahoo.com (or yahoo.co.jp for Yahoo Japan).

from others using the extension:
I loved this until a) it stopped telling me there was mail and b) AVAST kept telling me it was infected with a Trojan so I had to uninstall it.

Others are complaining also. Testing with latest versions.

Comment 2

9 years ago
Tested with FF3 with the latest Yahoo and Yahoo! Mail Notifier 1.0.0.6 installed with cookies enabled. Did not get an alert sound.

https://addons.mozilla.org/en-US/firefox/addon/1264

Confirm no sound - but is it the extension or FF3 ?
mail 2.0 and WEB mail on Safari have notifiers that sound correctly.


 
I'm the extension author, but I don't run Mac OS X so I couldn't test this myself.  When trying to diagnose the problem with Cathy we found that the default new mail sound will not play under Mac OS X in Firefox 3.0, but it worked fine in Firefox 2.0.  You don't need to install my extension to see the problem.

Steps to reproduce:
1. Paste the following in the error console:

(Components.Constructor("@mozilla.org/sound;1","nsISound"))().playSystemSound("_moz_mailbeep")


Expected result:
1. Play system new mail sound like it did in Firefox 2.0

Actual results:
1. no sound plays


Other details:
I do not know if this is somehow related to bug 434916 or not since Firefox doesn't crash, it just doesn't generate a sound.

I was told that the following does play the default system beep:
(Components.Constructor("@mozilla.org/sound;1","nsISound"))().beep() 

So the "_moz_mailbeep" either doesn't work or isn't locating the system mail sound correctly.

Comment 4

9 years ago
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1

Confirmed problem is without extension !

Using the above code pasted into error console:

no beep sounds in FF 3.0.1
   beep sounds in FF 2.0.0.16

Status: UNCONFIRMED → NEW
Ever confirmed: true
Since it works in FF 2.0.0.16, can you add "regression" keyword please?

Updated

9 years ago
Keywords: regression
Summary: Default New Mail alert beep doesn't play. → default beep doesn't work -- "@mozilla.org/sound;1","nsISound"))().beep()

Comment 6

9 years ago
I'm going to guess this code in our Cocoa sound impl has something to do with it.

NS_IMETHODIMP
nsSound::PlaySystemSound(const nsAString &aSoundAlias)
{
  return NS_OK;
}
Depends on: 469164
(Reporter)

Comment 7

9 years ago
Does this latest development in fixing Bug 443276 mean the default system beep/sound will be restored in the next Firefox 3 update? 
Or will it have to wait until Firefox 3.1 is officially released?

Updated

8 years ago
Assignee: joshmoz → nobody

Comment 8

6 years ago
Does anyone found the problem or solution yet? I cannot get it to work here as well.

Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound).beep();
(In reply to Sasha van den Heetkamp from comment #8)
> Does anyone found the problem or solution yet? I cannot get it to work here
> as well.
> 
> Components.classes["@mozilla.org/sound;1"].createInstance(Components.
> interfaces.nsISound).beep();


I don't think the nsISound was ever updated to do "beep" for Mac OS.  It was updated to play system sounds, but that uses a different method.  

See https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsISound


I'll mention that on that page, while it says playSystemSound() doesn't work for Mac OS, there's nothing about beep() not working.

Comment 10

6 years ago
Hi Michael, I forgot to mention that it doesn't work on WinXP as well. Paste the following into error console to compare:

Does not work:
--------------------------
Components.classes["@mozilla.org/sound;1"].createInstance(Components.interfaces.nsISound).beep();
--------------------------
Does work:
--------------------------
var o = new Audio();   
c=10000;     
o.mozSetup(1, c);           
var s = new Float32Array(c);                  
for (var i = 0; i < (c/10) ; i++) {              
	s[i] = Math.sin( i / (2* Math.PI * 440/44100));          
}                  
o.mozWriteAudio(s); 
--------------------------

The Audio API works like a charm, so I have sound. But nsISound seems to be broken here too, not only a beep but it also fails upon getting a Wavform to play. I tried everything to get it working, but to no avail yet.
You need to log in before you can comment on or make changes to this bug.