Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I wondering how are sound alerts used in the chat.
In the "hacking.txt" file it says "Chatroom sounds should use a jquery plugin."
Under chat room settings and "Chat alerts" there is several chat alert check boxes, like "Enable chat alerts", but for the "Use custom sounds for chat alerts" there is nothing (that I can see) how this even give any function.
So my question is: How can I enable sound alerts (for new messages in the chat)?
Comments
Comment #1
inky@inky3d.com CreditAttribution: inky@inky3d.com commentedI'd also like to know more about adding sounds.
Any progress on this?
Comment #2
geerlingguy CreditAttribution: geerlingguy commentedThe question is - are there any sounds at all? It looks like nothing implements sound at all yet, which makes the last option seem misleading :(
Comment #3
Shane Birley CreditAttribution: Shane Birley commentedMarking this as a feature request as it appears no code has yet been written. Please correct if I am wrong.
Comment #4
Paolo61 CreditAttribution: Paolo61 commentedAlso for me there are no alerts sound at all. J.ve istalled jquery and jquery plugin but with no results !
Comment #5
jsgammato CreditAttribution: jsgammato commentedI've got no sound alert, and I don't see any visual alert either. What should I be looking for?
Comment #6
pmaguniaIf anyone sends a message a sound is played. Currently a limitation is the same sound is played if a message is sent or received, but it does work.
I installed soundmanager2 (http://drupal.org/project/soundmanager2) which is a Drupal project and jazzed up the chatroom.js files.
soundManager.play('new_msg', 'http://www.example.com/sites/all/modules/chatroom/sounds/sound_1.mp3');
You need to replace the url in the code above with a url to your sound file. I think you can use the sound file on my site as it is copy left licensed.
It is placed in between
if (newMessage) {
and
Drupal.chatroom.scrollToLatestMessage();
I changed some of the code above so I can't give exact line numbers.
I hope this points you in the right direction. I'm sure this can be implemented into the chatroom settings so you don't actually have to edit code. I don't have too much free time, but please do contact me if you like to discuss this.
Comment #7
drein CreditAttribution: drein commentedany news?
I'm interested me too in this topic.
I activated the checkboxes but no sound
Comment #8
ah0 CreditAttribution: ah0 commentedany updates?
thanks.
Comment #9
gregglesThere are a few kinds of notifications we could do here, so I'm changing the title.
Those are
1. Use javascript to change the title tag to something that scrolls so the tab becomes more visible
2. Doing a javascript "alert" which will make the browser pull focus into that tab/window
3. Using javascript to play a sound (Google does this for voice calls/chats in gmail)
4. Popping up a separate window
Thanks to pmagunia for the tip on using the soundmanager2 modoule.
My idea is to create a set of preferences so site admins can choose with of those 4 are going to happen on their site. The sound notification could be disabled/hidden unless soundmanager2 module is installed.
Comment #10
c4rl CreditAttribution: c4rl commentedSubscribe
Comment #11
Shane Birley CreditAttribution: Shane Birley commented