Forum OpenACS Q&A: Response to sound on chat

Collapse
2: Response to sound on chat (response to 1)
Posted by Jonathan Ellis on
Last I looked at the chat module it was totally http based.  Meaning, there is no way for the server to initiate sending a message to your browser; your browser ALWAYS has to request something from the server instead.  You could probably have chat.tcl which I believe handles the main chatroom display serve up your bell sound when someone enters -- see the chat_post_system_note call in enter-chat.tcl -- but since chat.tcl caches the chat GLOBALLY to avoid abusing the DB, it's going to be all or nothing.  Everyone gets the bell, or nobody gets it.  Which may be acceptable to you, I don't know.

As to how to embed the sound in the first place, here is an example:
<embed src=chimes.wav border=0 width=0 height=0 autostart=true loop=false>