|
@@ -265,6 +265,14 @@
|
|
|
|
|
|
// TODO: init pro stream
|
|
|
},
|
|
|
+ onParticipantLeft: function(_id) {
|
|
|
+ this.pros = this.pros.filter(function(_row) {
|
|
|
+ return _row.id !== _id;
|
|
|
+ });
|
|
|
+ this.guests = this.guests.filter(function(_row) {
|
|
|
+ return _row.id !== _id;
|
|
|
+ });
|
|
|
+ },
|
|
|
leaveCall: function() {
|
|
|
this.stompClient.send("/app/meeting-participant-leave-meeting", {},
|
|
|
JSON.stringify({
|
|
@@ -309,6 +317,11 @@
|
|
|
console.log("on-pro-join-meeting:", message);
|
|
|
self.onProJoined(JSON.parse(message.body));
|
|
|
});
|
|
|
+ self.stompClient.subscribe("/topic/on-meeting-participant-left-meeting", function (message) {
|
|
|
+ console.log("/topic/on-meeting-participant-left-meeting", message);
|
|
|
+ var parsed = JSON.parse(message.body);
|
|
|
+ self.onParticipantLeft(parsed.meetingParticipantUid);
|
|
|
+ });
|
|
|
|
|
|
// join self
|
|
|
self.stompClient.send("/app/meeting-participant-join-meeting", {},
|
|
@@ -333,6 +346,11 @@
|
|
|
self.onProJoined(parsed);
|
|
|
self.participantID = parsed.meetingParticipantUid;
|
|
|
});
|
|
|
+ self.stompClient.subscribe("/topic/on-meeting-participant-left-meeting", function (message) {
|
|
|
+ console.log("/topic/on-meeting-participant-left-meeting", message);
|
|
|
+ var parsed = JSON.parse(message.body);
|
|
|
+ self.onParticipantLeft(parsed.meetingParticipantUid);
|
|
|
+ });
|
|
|
|
|
|
// join self
|
|
|
self.stompClient.send("/app/pro-join-meeting", {},
|