Tab is not active, what i need to change to play evan when is active?
<script>document.addEventListener('chatLoaded', function(event) {
event.chat.audioControl.loadSoundFile('http://www.soundjay.com/misc/sounds/handbag-lock-4.mp3');
document.addEventListener('newMessage', function(event) {
var chat = event.chat;
if (!chat.isActiveTab()) {
event.chat.audioControl.play();
}
});
});</script>
Please format the code you posted, by wrapping it in triple backticks. -> `
Please don't That's evil UX
Guess man
Обсуждают сегодня