From 259416ee3bdcbbc6beeaa65daf1cdb94bb54eff2 Mon Sep 17 00:00:00 2001 From: BhumiSalat Date: Thu, 29 Aug 2024 17:30:35 +0530 Subject: [PATCH] For participantNotification sound issue resolved --- src/meetingContainer/MeetingContainer.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/meetingContainer/MeetingContainer.js b/src/meetingContainer/MeetingContainer.js index 0d4ffc0..1e24545 100755 --- a/src/meetingContainer/MeetingContainer.js +++ b/src/meetingContainer/MeetingContainer.js @@ -484,22 +484,26 @@ const MeetingContainer = () => { const _handleParticipantJoined = (data) => { if (showJoinNotificationRef.current) { const { displayName } = data; - if (notificationSoundEnabled) { - new Audio(`https://static.videosdk.live/prebuilt/notification.mp3`).play(); - } - if (participantNotificationAlertsEnabled) { - enqueueSnackbar(`${displayName} joined the meeting`, {}); - } + if (participantNotificationAlertsEnabled) { + if (notificationSoundEnabled) { + new Audio( + `https://static.videosdk.live/prebuilt/notification.mp3` + ).play(); + } + enqueueSnackbar(`${displayName} joined the meeting`, {}); + } } }; const _handleParticipantLeft = (data) => { const { displayName } = data; - if (notificationSoundEnabled) { - new Audio(`https://static.videosdk.live/prebuilt/notification.mp3`).play(); - } if (participantNotificationAlertsEnabled) { - enqueueSnackbar(`${displayName} left the meeting`, {}); + if (notificationSoundEnabled) { + new Audio( + `https://static.videosdk.live/prebuilt/notification.mp3` + ).play(); + } + enqueueSnackbar(`${displayName} left the meeting`, {}); } };