diff --git a/app/img/sound_a.mp3 b/app/img/sound_a.mp3 new file mode 100644 index 00000000..0a9f875f Binary files /dev/null and b/app/img/sound_a.mp3 differ diff --git a/app/img/sound_a.wav b/app/img/sound_a.wav deleted file mode 100644 index c6b95a1e..00000000 Binary files a/app/img/sound_a.wav and /dev/null differ diff --git a/app/js/services.js b/app/js/services.js index 6d3520c6..87adfc30 100644 --- a/app/js/services.js +++ b/app/js/services.js @@ -3567,6 +3567,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) var notificationIndex = 0; var notificationsCount = 0; var vibrateSupport = !!navigator.vibrate; + var nextSoundAt = false; + var prevSoundVolume = false; var peerSettings = {}; var faviconBackupEl = $('link[rel="icon"]:first'), faviconNewEl = $(''); @@ -3786,7 +3788,13 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) }; function playSound (volume) { - var filename = 'img/sound_a.wav'; + var now = tsNow(); + if (nextSoundAt && now < nextSoundAt && prevSoundVolume == volume) { + return; + } + nextSoundAt = now + 1000; + prevSoundVolume = volume; + var filename = 'img/sound_a.mp3'; var obj = $('#notify_sound').html('