Closed
Bug 1141932
Opened 10 years ago
Closed 10 years ago
Chat sound preview doesn't work for default system sound on Mac OS
Categories
(Thunderbird :: Instant Messaging, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 39.0
People
(Reporter: sshagarwal, Assigned: sshagarwal)
References
Details
Attachments
(1 file, 2 obsolete files)
1.43 KB,
patch
|
sshagarwal
:
review+
|
Details | Diff | Splinter Review |
No sound is heard when the chat sound preview button is pressed for default system sound on Mac OS.
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsISound#playSystemSound() suggests that playSystemSound isn't supported on Macintosh.
So, this is a possible fix. It fixes the issue for me.
Thanks.
Attachment #8575800 -
Flags: review?(aleth)
Comment 1•10 years ago
|
||
Comment on attachment 8575800 [details] [diff] [review]
Patch v1
Review of attachment 8575800 [details] [diff] [review]:
-----------------------------------------------------------------
::: mail/components/preferences/chat.js
@@ +60,5 @@
> let soundLocation = document.getElementById("chatSoundType").value == 1 ?
> document.getElementById("chatSoundUrlLocation").value :
> "_moz_mailbeep";
>
> if (!soundLocation.startsWith("file://"))
Please a add a comment saying that this should match the code in nsStatusBarBiffManager::PlayBiffSound.
@@ +68,1 @@
> sound.playSystemSound(soundLocation);
This does not seem to match what actually happens for messages, nsStatusBarBiffManager:PlayBiffSound uses playEventSound
Attachment #8575800 -
Flags: review?(aleth) → review-
Assignee | ||
Comment 2•10 years ago
|
||
(In reply to aleth [:aleth] from comment #1)
> Comment on attachment 8575800 [details] [diff] [review]
> Patch v1
>
> Review of attachment 8575800 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: mail/components/preferences/chat.js
> @@ +60,5 @@
> > let soundLocation = document.getElementById("chatSoundType").value == 1 ?
> > document.getElementById("chatSoundUrlLocation").value :
> > "_moz_mailbeep";
> >
> > if (!soundLocation.startsWith("file://"))
>
> Please a add a comment saying that this should match the code in
> nsStatusBarBiffManager::PlayBiffSound.
>
> @@ +68,1 @@
> > sound.playSystemSound(soundLocation);
>
> This does not seem to match what actually happens for messages,
> nsStatusBarBiffManager:PlayBiffSound uses playEventSound
Okay, will replace this call as well.
So, I think we are getting rid of "_moz_mailbeep" altogether then.
Assignee | ||
Comment 3•10 years ago
|
||
Okay so I have removed "_moz_mailbeep" as it wasn't being used anywhere now.
Also, I was told that using heterogenous type of date for the same variable, though allowed, isn't a good idea for many reasons and the test of soundLocation.startsWith would have failed, I didn't assign nsISound.EVENT.. to the soundLocation as a part of the ternary operator as left it blank.
Thanks.
Attachment #8575800 -
Attachment is obsolete: true
Attachment #8576583 -
Flags: review?(aleth)
Comment 4•10 years ago
|
||
Comment on attachment 8576583 [details] [diff] [review]
Patch v2
Review of attachment 8576583 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Please add the comment I requested before you land this.
Attachment #8576583 -
Flags: review?(aleth) → review+
Assignee | ||
Comment 5•10 years ago
|
||
Okay, thanks.
If this comment isn't correct, please let me know.
Attachment #8576583 -
Attachment is obsolete: true
Attachment #8577086 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
![]() |
||
Comment 6•10 years ago
|
||
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/b476a043292b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
You need to log in
before you can comment on or make changes to this bug.
Description
•