Anyway to make a custom command that plays a sound file?

143 views
Skip to first unread message

Minako Aino

unread,
May 30, 2015, 11:37:33 PM5/30/15
to ajax...@googlegroups.com
Wanted to make some / switches for playing some embedded sound files in chat. However Pruning through the source, so far I'm not finding much.

I'm guessing its along the lines of this.

 ajaxChat.replaceCustomCommands = function(text, textParts) {
   
switch(textParts[0]) {
case '/yeah!':
text
=text.replace('/yeah!', ");
ajaxChat.playSound(soundError);
break;
}
}


obviously in config.js  I'd need to define it like such

        // Defines the sound that is played on error messages:
        soundError
: 'sound_6',

^ the above is already in there, and I'd add it below.

In loggedin.html

           ajaxChat.fillSoundSelection('soundErrorSetting', ajaxChat.getSetting('soundError'));



I'm sure there are other places, however I'm trying to manually invoke it via command vs add it to the chat.
However still messing around with it. If anyone can lead me in the right direction I'd greatly appreciate it <3

Minako Aino

unread,
Jun 13, 2015, 3:39:01 PM6/13/15
to ajax...@googlegroups.com
Figured it out, you can close this thanks!


andu

unread,
Jun 21, 2015, 1:56:33 AM6/21/15
to ajax...@googlegroups.com

Can you share that mode with me ? :P


Message has been deleted

Rjaea Radio

unread,
Mar 2, 2016, 4:06:12 PM3/2/16
to AJAX-chat
Can you share the code with us?, I really need this, Thanks

Cuore di angelo

unread,
Mar 4, 2016, 12:41:15 PM3/4/16
to ajax...@googlegroups.com
share the code with us ... :)

Reply all
Reply to author
Forward
0 new messages