diff --git a/addons/mail/static/src/audio/deafen_new_01.mp3 b/addons/mail/static/src/audio/deafen_new_01.mp3 new file mode 100644 index 00000000000..b26bda69f56 Binary files /dev/null and b/addons/mail/static/src/audio/deafen_new_01.mp3 differ diff --git a/addons/mail/static/src/audio/deafen_new_01.ogg b/addons/mail/static/src/audio/deafen_new_01.ogg new file mode 100644 index 00000000000..32b21123b9f Binary files /dev/null and b/addons/mail/static/src/audio/deafen_new_01.ogg differ diff --git a/addons/mail/static/src/audio/dm_01.mp3 b/addons/mail/static/src/audio/dm_01.mp3 deleted file mode 100644 index 71f600e8c62..00000000000 Binary files a/addons/mail/static/src/audio/dm_01.mp3 and /dev/null differ diff --git a/addons/mail/static/src/audio/dm_01.ogg b/addons/mail/static/src/audio/dm_01.ogg deleted file mode 100644 index 4d6a381aaab..00000000000 Binary files a/addons/mail/static/src/audio/dm_01.ogg and /dev/null differ diff --git a/addons/mail/static/src/audio/mute_1.mp3 b/addons/mail/static/src/audio/mute_1.mp3 new file mode 100644 index 00000000000..fce9babe72a Binary files /dev/null and b/addons/mail/static/src/audio/mute_1.mp3 differ diff --git a/addons/mail/static/src/audio/mute_1.ogg b/addons/mail/static/src/audio/mute_1.ogg new file mode 100644 index 00000000000..3f8019f8f94 Binary files /dev/null and b/addons/mail/static/src/audio/mute_1.ogg differ diff --git a/addons/mail/static/src/audio/ptt_push_1.mp3 b/addons/mail/static/src/audio/ptt_push_1.mp3 new file mode 100644 index 00000000000..ae58993ce21 Binary files /dev/null and b/addons/mail/static/src/audio/ptt_push_1.mp3 differ diff --git a/addons/mail/static/src/audio/ptt_push_1.ogg b/addons/mail/static/src/audio/ptt_push_1.ogg new file mode 100644 index 00000000000..9d1cf7b2b2e Binary files /dev/null and b/addons/mail/static/src/audio/ptt_push_1.ogg differ diff --git a/addons/mail/static/src/audio/ptt_release_1.mp3 b/addons/mail/static/src/audio/ptt_release_1.mp3 new file mode 100644 index 00000000000..3bcedd2c7ee Binary files /dev/null and b/addons/mail/static/src/audio/ptt_release_1.mp3 differ diff --git a/addons/mail/static/src/audio/ptt_release_1.ogg b/addons/mail/static/src/audio/ptt_release_1.ogg new file mode 100644 index 00000000000..5250cb7bd61 Binary files /dev/null and b/addons/mail/static/src/audio/ptt_release_1.ogg differ diff --git a/addons/mail/static/src/audio/undeafen_new_01.mp3 b/addons/mail/static/src/audio/undeafen_new_01.mp3 new file mode 100644 index 00000000000..9de8fc36b0b Binary files /dev/null and b/addons/mail/static/src/audio/undeafen_new_01.mp3 differ diff --git a/addons/mail/static/src/audio/undeafen_new_01.ogg b/addons/mail/static/src/audio/undeafen_new_01.ogg new file mode 100644 index 00000000000..837932f9d22 Binary files /dev/null and b/addons/mail/static/src/audio/undeafen_new_01.ogg differ diff --git a/addons/mail/static/src/audio/unmute_1.mp3 b/addons/mail/static/src/audio/unmute_1.mp3 new file mode 100644 index 00000000000..f7fac0ac815 Binary files /dev/null and b/addons/mail/static/src/audio/unmute_1.mp3 differ diff --git a/addons/mail/static/src/audio/unmute_1.ogg b/addons/mail/static/src/audio/unmute_1.ogg new file mode 100644 index 00000000000..89533eb238b Binary files /dev/null and b/addons/mail/static/src/audio/unmute_1.ogg differ diff --git a/addons/mail/static/src/models/rtc/rtc.js b/addons/mail/static/src/models/rtc/rtc.js index 100cc8e346f..d419eb72a0e 100644 --- a/addons/mail/static/src/models/rtc/rtc.js +++ b/addons/mail/static/src/models/rtc/rtc.js @@ -97,6 +97,7 @@ registerModel({ recordMethods: { async deafen() { await this._setDeafState(true); + this.messaging.soundEffects.deafen.play(); }, /** * Removes and disconnects all the peerConnections that are not current members of the call. @@ -200,6 +201,7 @@ registerModel({ }, async mute() { await this._setMuteState(true); + this.messaging.soundEffects.mute.play(); }, /** * Resets the state of the model and cleanly ends all connections and @@ -259,6 +261,7 @@ registerModel({ }, async undeafen() { await this._setDeafState(false); + this.messaging.soundEffects.undeafen.play(); }, async unmute() { if (this.audioTrack) { @@ -267,6 +270,7 @@ registerModel({ // if we don't have an audioTrack, we try to request it again await this.updateLocalAudioTrack(true); } + this.messaging.soundEffects.unmute.play(); }, /** * @param {Boolean} audio @@ -1164,7 +1168,7 @@ registerModel({ browser.clearTimeout(this._pushToTalkTimeoutId); } if (!this.currentRtcSession.isTalking) { - this.messaging.soundEffects.pushToTalk.play({ volume: 0.3 }); + this.messaging.soundEffects.pushToTalkOn.play(); this._setSoundBroadcast(true); } }, @@ -1183,7 +1187,7 @@ registerModel({ return; } if (!this.currentRtcSession.isMute) { - this.messaging.soundEffects.pushToTalk.play({ volume: 0.3 }); + this.messaging.soundEffects.pushToTalkOff.play(); } this._pushToTalkTimeoutId = browser.setTimeout( () => { diff --git a/addons/mail/static/src/models/sound_effects/sound_effects.js b/addons/mail/static/src/models/sound_effects/sound_effects.js index b46353ceba2..8e2511b5eea 100644 --- a/addons/mail/static/src/models/sound_effects/sound_effects.js +++ b/addons/mail/static/src/models/sound_effects/sound_effects.js @@ -16,6 +16,10 @@ registerModel({ default: insertAndReplace({ filename: 'channel_04_out' }), isCausal: true, }), + deafen: one('SoundEffect', { + default: insertAndReplace({ filename: 'deafen_new_01' }), + isCausal: true, + }), incomingCall: one('SoundEffect', { default: insertAndReplace({ filename: 'call_02_in_' }), isCausal: true, @@ -24,17 +28,33 @@ registerModel({ default: insertAndReplace({ filename: 'channel_01_out' }), isCausal: true, }), + mute: one('SoundEffect', { + default: insertAndReplace({ filename: 'mute_1' }), + isCausal: true, + }), newMessage: one('SoundEffect', { default: insertAndReplace({ filename: 'dm_02' }), isCausal: true, }), - pushToTalk: one('SoundEffect', { - default: insertAndReplace({ filename: 'dm_01' }), + pushToTalkOn: one('SoundEffect', { + default: insertAndReplace({ filename: 'ptt_push_1' }), + isCausal: true, + }), + pushToTalkOff: one('SoundEffect', { + default: insertAndReplace({ filename: 'ptt_release_1' }), isCausal: true, }), screenSharing: one('SoundEffect', { default: insertAndReplace({ filename: 'share_02' }), isCausal: true, }), + undeafen: one('SoundEffect', { + default: insertAndReplace({ filename: 'undeafen_new_01' }), + isCausal: true, + }), + unmute: one('SoundEffect', { + default: insertAndReplace({ filename: 'unmute_1' }), + isCausal: true, + }), }, });