frontend: Add sound notification for participant joining the meeting

This commit is contained in:
CSantosM 2026-01-19 17:08:21 +01:00
parent b5ccd7c087
commit 5f722c36e7
4 changed files with 16 additions and 1 deletions

View File

@ -49,7 +49,7 @@
[showThemeSelector]="features().showThemeSelector"
[showDisconnectionDialog]="false"
(onRoomCreated)="onRoomCreated($event)"
(onParticipantConnected)="eventHandlerService.onParticipantConnected($event)"
(onParticipantConnected)="onParticipantConnected($event)"
(onParticipantLeft)="onParticipantLeft($event)"
(onRecordingStartRequested)="eventHandlerService.onRecordingStartRequested($event)"
(onRecordingStopRequested)="eventHandlerService.onRecordingStopRequested($event)"

View File

@ -201,6 +201,12 @@ export class MeetingComponent implements OnInit {
window.open(`/room/${this.roomId()}/recordings?secret=${this.roomSecret()}`, '_blank');
}
onParticipantConnected(event: any): void {
// Play joined sound
this.meetingService.playParticipantJoinedSound();
this.eventHandlerService.onParticipantConnected(event);
}
/**
* Handles the participant left event and hides the videoconference component
*/

View File

@ -27,6 +27,15 @@ export class MeetingService {
this.notificationService.showSnackbar('Speaker link copied to clipboard');
}
/**
* Plays a sound to indicate that a participant has joined the meeting.
*/
playParticipantJoinedSound(): void {
const audio = new Audio('/assets/sounds/participant-joined.mp3');
audio.volume = 0.5;
audio.play();
}
/**
* Ends a meeting by its room ID.
*