frontend: Add sound notification for participant joining the meeting
This commit is contained in:
parent
b5ccd7c087
commit
5f722c36e7
@ -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)"
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
@ -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.
|
||||
*
|
||||
|
||||
BIN
meet-ce/frontend/src/assets/sounds/participant-joined.mp3
Normal file
BIN
meet-ce/frontend/src/assets/sounds/participant-joined.mp3
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user