Hello.
It is necessary that with the incoming message on the site, the sound is played, by type, like a contact! How to implement it? Script for checking for messages is available, how to insert a playback of an audio file into it?
Solved the problem like this:
function soundClick() { var audio = new Audio(); // Создаём новый элемент Audio audio.src = 'n.mp3'; // Указываем путь к звуку "клика" audio.autoplay = true; // Автоматически запускаем }