[IMP] mail: add and update sound effects of rtc call interactions
task-2692600 Part-of: odoo/odoo#82337
This commit is contained in:
committed by
Alexandre Kühn
parent
05261f12c2
commit
da9681696b
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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(
|
||||
() => {
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user