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)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 39.0

People

(Reporter: sshagarwal, Assigned: sshagarwal)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch Patch v1 (obsolete) — 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 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-
(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.
Attached patch Patch v2 (obsolete) — Splinter Review
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 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+
Okay, thanks. If this comment isn't correct, please let me know.
Attachment #8576583 - Attachment is obsolete: true
Attachment #8577086 - Flags: review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
Depends on: 1144256
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: