Pushpad
Articles › Notification Appearance, Web Push Notifications

Sound on web push notifications

  • # web-notifications

There are different ways to control the beep / sound made by web push notifications.

First of all, the website that sends the notification can choose whether the notification should play a sound or not. By default, all web push notifications play a sound, but a website can also choose to create silent notifications using the appropriate option:

serviceWorkerRegistration.showNotification(title, { silent: true });

If you are a developer and you use Pushpad for sending notifications from your website, you can set the silent option when you send a notification:

  • if you are sending the notifications from the dashboard, you can set the "Silent" checkbox from "Advanced options" (or set the option globally in the project settings)
  • if you are sending using the REST API, you can set the silent option in the HTTP request body.

You can also go to the Pushpad dashboard, click "Details" on a specific notification, and see if the option "Silent" is enabled or not for that specific notification.

Finally there are other factors that can mute the notifications on your device, for example:

  • the smartphone / device is on mute
  • the sound level is very low or set to zero
  • you have enabled the "Do Not Disturb" mode or something similar in your OS settings
  • you have disabled the sound for all the browser notifications (e.g. check in your OS settings / permissions that Chrome can play a sound when it receives a notification)
  • you have muted the notifications or blocked sounds for a specific website / PWA (e.g. check Chrome settings / permissions for that specific website).

Finally note that the Notifications API standard allows to turn on / turn off the sound, but it does not allow to choose a custom sound. The type of sound can't be changed and it is defined by the browser / OS.

Note about custom sound: back in 2014, a commit to support custom sound was added to the Notifications API standard. However custom sound was never implemented in any browser. Finally in 2018 the sound property for notifications was completely removed from the standard:

There are no implementations for this property, and the native notification centers of various platforms make it hard to support this properly.

See this discussion on GitHub