Ajout de la lecture d'un son sur reception d'un message

This commit is contained in:
OsaAjani 2015-12-09 19:06:06 +01:00
parent 08af44287a
commit cfd0e95b85
7 changed files with 20 additions and 0 deletions

View file

@ -29,6 +29,7 @@ function verifReceived()
jQuery.getJSON(HTTP_PWD + "/receiveds/popup", function( data ) {
$.each(data, function(key, val) {
showMessage('SMS reçu du ' + val.send_by.replace(/</g, "&lt;").replace(/>/g, "&gt;") + ' : ' + val.content.replace(/</g, "&lt;").replace(/>/g, "&gt;"), 1);
playReceptionSound();
});
});
}
@ -50,6 +51,14 @@ function scrollDownDiscussion()
}
}
/**
* Cette fonction jou le son de reception d'un SMS
*/
function playReceptionSound ()
{
jQuery('body').find('#reception-sound').play();
}
jQuery(document).ready(function()
{
var verifReceivedInterval = setInterval(verifReceived, 10000);