Ajout de la lecture d'un son sur reception d'un message
This commit is contained in:
parent
6fe2ab5193
commit
c8c1679434
|
@ -240,3 +240,8 @@ footer
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* AUDIO RECEPTION MESSAGE */
|
||||||
|
#reception-sound
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ function verifReceived()
|
||||||
jQuery.getJSON(HTTP_PWD + "/receiveds/popup", function( data ) {
|
jQuery.getJSON(HTTP_PWD + "/receiveds/popup", function( data ) {
|
||||||
$.each(data, function(key, val) {
|
$.each(data, function(key, val) {
|
||||||
showMessage('SMS reçu du ' + val.send_by.replace(/</g, "<").replace(/>/g, ">") + ' : ' + val.content.replace(/</g, "<").replace(/>/g, ">"), 1);
|
showMessage('SMS reçu du ' + val.send_by.replace(/</g, "<").replace(/>/g, ">") + ' : ' + val.content.replace(/</g, "<").replace(/>/g, ">"), 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()
|
jQuery(document).ready(function()
|
||||||
{
|
{
|
||||||
var verifReceivedInterval = setInterval(verifReceived, 10000);
|
var verifReceivedInterval = setInterval(verifReceived, 10000);
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -80,6 +80,7 @@
|
||||||
'<div class="discussion-message-date">' + message.date + '</div>' +
|
'<div class="discussion-message-date">' + message.date + '</div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'</div>';
|
'</div>';
|
||||||
|
playReceptionSound();
|
||||||
break;
|
break;
|
||||||
case 'sended' :
|
case 'sended' :
|
||||||
var texte = '' +
|
var texte = '' +
|
||||||
|
|
|
@ -2,5 +2,10 @@
|
||||||
RaspiSMS a été créé pour vous par le site <a href="http://raspbian-france.fr">Raspbian-France</a>, site dédié à la Raspberry Pi<br/>
|
RaspiSMS a été créé pour vous par le site <a href="http://raspbian-france.fr">Raspbian-France</a>, site dédié à la Raspberry Pi<br/>
|
||||||
Copyright 2014. RaspiSMS est un programme sous <a href="https://www.gnu.org/licenses/gpl.txt" rel="nofollow">licence GNU GPL</a>.<br/>
|
Copyright 2014. RaspiSMS est un programme sous <a href="https://www.gnu.org/licenses/gpl.txt" rel="nofollow">licence GNU GPL</a>.<br/>
|
||||||
</footer>
|
</footer>
|
||||||
|
<audio id="reception-sound">
|
||||||
|
<source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.ogg" type="audio/ogg">
|
||||||
|
<source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.mp3" type="audio/mpeg">
|
||||||
|
<source src="<?php echo HTTP_PWD; ?>sounds/receptionSound.wav" type="audio/wav">
|
||||||
|
</audio>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue