Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 8bbc8f2

Browse files
Merge pull request #4 from dolbyio-samples/develop
Fix leave conference action
2 parents 0f53f72 + 50aebae commit 8bbc8f2

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

script.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -367,25 +367,25 @@ $("#conference-listen-btn").click(function() {
367367
});
368368

369369
$("#conference-leave-btn").click(function() {
370+
// Unsubscribe from the participant joined/left events
371+
VoxeetSDK.notification.unsubscribe([{
372+
type: "Participant.Left",
373+
conferenceAlias: conference.alias
374+
},
375+
{
376+
type: "Participant.Joined",
377+
conferenceAlias: conference.alias
378+
},
379+
{
380+
type: "Conference.ActiveParticipants",
381+
conferenceAlias: conference.alias
382+
}]);
383+
370384
// Leave the conference
371385
VoxeetSDK.conference.leave()
372386
.then(() => {
373387
conferenceAccessToken = null;
374388

375-
//unsubsribe from the participant joined/left events
376-
VoxeetSDK.notification.unsubscribe([{
377-
type: "Participant.Left",
378-
conferenceAlias: conference.alias
379-
},
380-
{
381-
type: "Participant.Joined",
382-
conferenceAlias: conference.alias
383-
},
384-
{
385-
type: "Conference.ActiveParticipants",
386-
conferenceAlias: conference.alias
387-
}]);
388-
389389
$('#chk-live-recording').attr('disabled', false);
390390

391391
$('#btn-set-output-audio-device').attr('disabled', true);

0 commit comments

Comments
 (0)