Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom notification sounds, globally and per room. #2105

Closed
Half-Shot opened this issue Sep 6, 2016 · 11 comments · Fixed by matrix-org/matrix-react-sdk#2928
Closed

Custom notification sounds, globally and per room. #2105

Half-Shot opened this issue Sep 6, 2016 · 11 comments · Fixed by matrix-org/matrix-react-sdk#2928
Assignees
Labels
P2 T-Enhancement Z-Community-PR Issue is solved by a community member's PR

Comments

@Half-Shot
Copy link
Member

Half-Shot commented Sep 6, 2016

Kinda surprised this hasn't been suggested yet, given how useful it could be for users who are not a fan of the notification sound, or who have a bazillion rooms and would like to be able to distinguish them audibly.

The implementation could work like:

  • User uploads a sound clip to HS (which would probably be limited by whitelist to ogg or mp3)
  • Store the mxcurl inside /_matrix/client/r0/user/@Half-Shot:half-shot.uk/rooms/!somethinghere:matrix.org/account_data/org.matrix.notifysound
    (or omit the room for global)
  • Load the sound either on initial load or when the first notification is received.

Pitfalls:

  • Browser support for sound formats is still patchy and although I don't think we should avoid implementing this altogether, it would be wise to fall back to the default sound for browsers that suck. Might even be worth warning users somewhere if possible.
@dud1337
Copy link

dud1337 commented May 31, 2020

Did this solve it globally or just per room?

@Half-Shot
Copy link
Member Author

Did this solve it globally or just per room?

Technically yes. Riot supports setting a global custom sound as well as a room one, however only the room UI is exposed. You'll need to use the developer tools to set global sounds for now.

@dud1337
Copy link

dud1337 commented May 31, 2020

Thanks, man.

@rosalogia
Copy link

For clarification, what file formats are readable when it comes to custom notification sounds right now?

@Half-Shot
Copy link
Member Author

For clarification, what file formats are readable when it comes to custom notification sounds right now?

IIRC, we don't validate beyond what your browser supports. E.g. I'd expect ogg/mp3/wav to be supported.

@rosalogia
Copy link

rosalogia commented Jun 3, 2020

For some reason facing an issue where once I upload an ogg for a specific chat and save it, the fact that the new notification sound was ever uploaded and set completely disappears from the settings page. At first it will look like this:
image

But once I go back in it looks like this again:
image

Any idea how I can begin debugging the issue?

@matrixes
Copy link

matrixes commented Oct 30, 2021

Did this solve it globally or just per room?

Technically yes. Riot supports setting a global custom sound as well as a room one, however only the room UI is exposed. You'll need to use the developer tools to set global sounds for now.

@Half-Shot "You'll need to use the developer tools"

Can I ask for something a bit more specific? I'd like to replace the global sound and am very comfortable with messing around in hidder settings/making temporary changes, but I'm drawing a blank in terms of where in the developer tools I need to poke around. Thanks.

@ohporter
Copy link

Did this solve it globally or just per room?

Technically yes. Riot supports setting a global custom sound as well as a room one, however only the room UI is exposed. You'll need to use the developer tools to set global sounds for now.

@Half-Shot "You'll need to use the developer tools"

Can I ask for something a bit more specific? I'd like to replace the global sound and am very comfortable with messing around in hidder settings/making temporary changes, but I'm drawing a blank in terms of where in the developer tools I need to poke around. Thanks.

Same question here. I'm just starting to poke around at this as I have a lot of users unhappy with the default sound.

@Half-Shot
Copy link
Member Author

Half-Shot commented Dec 20, 2021

Fair warning that the following steps may void your warranty or brick your client.

To change the sound globally:

  • Set a notification sound in a single room, either in a test room or one you have already.
  • Say /devtools in that room.
  • Click Explore Account Data.
  • Click the red Account Data button.
  • Click im.vector.web.settings.
  • Copy the notificationSound block

e.g.

	"notificationSound": {
		"name": "your-sound-name.ogg",
		"type": "audio/yourmimetype",
		"size": 0000,
		"url": "mxc://half-shot.uk/59770ed76c3527ba43b54b1791589ca5a95a5b43"
	},
  • Click Back
  • Click the green Room Data button
  • Click im.vector.web.settings
  • Click Edit (you may have to scroll down)
  • Insert the following above json object into the object somewhere, being careful to replace the text below.
  • Click Send.
  • Sounds should now change globally.

@Half-Shot
Copy link
Member Author

Suggest further commentary on global sounds takes place on #20286

@dud1337
Copy link

dud1337 commented Jul 6, 2022

@Half-Shot, I think you need to flip the order of Room Data and Account Data in that awesome guide of yours.

@element-hq element-hq locked as resolved and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P2 T-Enhancement Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants