Play a Sound on Alert


#1

Yeah, second one from me. Will be the last one for now, i promise :slight_smile:

I’d like to add a sound playing option to alerts (like follow, host, sub etc.)

(playsound sound) doesnt work.


#2

Looks like you’re trying to use audio hooks:

You can also integrate audio hooks and alerts to the code in order for them to play when you get a new follow or etc.


#3

hi, and thanks for the answer, sorry for the big delay. i can imagine that the needed part of playback code can be found in the audiopanelsystem.js and has to be put into the handlers. my problem is, i`m not sure what exactly. could you give me advice what to put where? with an example, if possible? thanks in advance :slight_smile:


#4

The audio panel system handles the playback of the sounds on the audio panel.

To play back those you’d use:
$.panelsocketserver.triggerAudioPanel("the name here");


#5

Hi, thanks for the reply. I will try to implement this and come back here soon :slight_smile:


#6

Hi, it worked perfectly! Thanks again :slight_smile: