Playing hit sound on the server

If you really want the hit sound, but it doesn’t play in the browser for any reason (or if you don’t want to keep the tab open all the time) you can play it on the server by adding this at the end of the config

IF STRINGKEY @data.STATUS EqualTo "SUCCESS"
System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
myPlayer.SoundLocation = @"wwwroot/sounds/hit.wav";
myPlayer.Play();
END
1 Like