signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.63k stars 2.67k forks source link

[BUG] Notification sound doesn't play if it was changed in Windows settings #5608

Open Lauriichan opened 3 years ago

Lauriichan commented 3 years ago

Bug Description

When using a custom notification sound on windows 10 the sound doesn't play at all even though it can play normally from the windows settings. Also if you revert the sounds to the default windows sound pack then it works again. A restart of the application or computer did not help with this issue.

Steps to Reproduce

  1. Go into Windows Settings
  2. Open Themes Settings
  3. Click on Sounds
  4. Edit the "Notification" sound in the Program Events Box in the Windows category
  5. Receive a message from someone while having notifications as well as notifications sounds on

Actual Result:

The custom sound doesn't play and instead no sound plays at all

Expected Result:

The custom sound should play

Screenshots

image image image

Platform Info

Signal Version: 5.22.0

Operating System: Windows 10 64-bit

Linked Device Version: iOS 15.0.2

Link to Debug Log

https://debuglogs.org/7e527a51078d8454c0163d58506f33874bcdddd57bfba1ecdca76a3704400616.gz

Lauriichan commented 5 months ago

Update: This still doesn't work :/

Lauriichan commented 5 months ago

Where would the change be required?

jamiebuilds-signal commented 5 months ago

It looks like the framework we're using only supports this on macOS, so windows support would have to be added there: https://www.electronjs.org/docs/latest/api/notification#playing-sounds

Lauriichan commented 3 months ago

After looking at the documentation I found out that window support is given. However for that to work signal would need to set the "toastXml" argument. See here for documentation fo toast content information: https://learn.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/toast-schema (XML Schema: https://learn.microsoft.com/en-us/uwp/schemas/tiles/toastschema/schema-root)

indutny-signal commented 3 months ago

@Lauriichan thanks for finding this! I believe we already generate toastXml. Are you suggesting something in particular? I see that the doc mentions ToastAudio, but it is mostly for overriding the defaults and shouldn't have any effect otherwise as far as I see it.

Lauriichan commented 3 months ago

In general it would be neat if the sound could be customized - even just changing the default windows sounds is kind of hidden in the settings so if there is a possibility to use them that would most likely fix it and if not being able to just select a custom sound in the signal app would be the most beneficial in my opinion.

Lauriichan commented 3 months ago

This documentation seems to be related to using default notification sounds of windows maybe this could be interesting

EDIT: The current default sound that is used by the toast seems to be "ms-winsoundevent:Notification.Default". Since signal is a instant messaging app the team could consider using "[ms ](ms-winsoundevent:Notification.IM" instead. See here for full list of windows default sounds in toasts