diff --git a/front/dist/index.html b/front/dist/index.html
index 5806bef7..ea2f517f 100644
--- a/front/dist/index.html
+++ b/front/dist/index.html
@@ -113,6 +113,9 @@
+
diff --git a/front/dist/resources/objects/webrtc-out.mp3 b/front/dist/resources/objects/webrtc-out.mp3
new file mode 100644
index 00000000..53c45686
Binary files /dev/null and b/front/dist/resources/objects/webrtc-out.mp3 differ
diff --git a/front/src/WebRtc/MediaManager.ts b/front/src/WebRtc/MediaManager.ts
index 6c3b6898..7fced45c 100644
--- a/front/src/WebRtc/MediaManager.ts
+++ b/front/src/WebRtc/MediaManager.ts
@@ -38,6 +38,7 @@ export class MediaManager {
microphoneClose: HTMLImageElement;
microphone: HTMLImageElement;
webrtcInAudio: HTMLAudioElement;
+ private webrtcOutAudio: HTMLAudioElement;
constraintsMedia : MediaStreamConstraints = {
audio: true,
video: videoConstraint
@@ -57,8 +58,6 @@ export class MediaManager {
private discussionManager: DiscussionManager;
- private userInputManager?: UserInputManager;
-
private hasCamera = true;
private triggerCloseJistiFrame : Map = new Map();
@@ -67,7 +66,9 @@ export class MediaManager {
this.myCamVideo = HtmlUtils.getElementByIdOrFail('myCamVideo');
this.webrtcInAudio = HtmlUtils.getElementByIdOrFail('audio-webrtc-in');
+ this.webrtcOutAudio = HtmlUtils.getElementByIdOrFail('audio-webrtc-out');
this.webrtcInAudio.volume = 0.2;
+ this.webrtcOutAudio.volume = 0.2;
this.microphoneBtn = HtmlUtils.getElementByIdOrFail('btn-micro');
this.microphoneClose = HtmlUtils.getElementByIdOrFail('microphone-close');
@@ -566,6 +567,10 @@ export class MediaManager {
removeActiveScreenSharingVideo(userId: string) {
this.removeActiveVideo(`screen-sharing-${userId}`)
}
+
+ playWebrtcOutSound(): void {
+ this.webrtcOutAudio.play();
+ }
isConnecting(userId: string): void {
const connectingSpinnerDiv = this.getSpinner(userId);
diff --git a/front/src/WebRtc/SimplePeer.ts b/front/src/WebRtc/SimplePeer.ts
index 1d81b704..2d8e5162 100644
--- a/front/src/WebRtc/SimplePeer.ts
+++ b/front/src/WebRtc/SimplePeer.ts
@@ -202,8 +202,8 @@ export class SimplePeer {
* This is triggered twice. Once by the server, and once by a remote client disconnecting
*/
private closeConnection(userId : number) {
+ mediaManager.playWebrtcOutSound();
try {
- //mediaManager.removeActiveVideo(userId);
const peer = this.PeerConnectionArray.get(userId);
if (peer === undefined) {
console.warn("closeConnection => Tried to close connection for user "+userId+" but could not find user");