|
@@ -397,6 +397,16 @@
|
|
if(message && message.body) {
|
|
if(message && message.body) {
|
|
let eventData = JSON.parse(message.body);
|
|
let eventData = JSON.parse(message.body);
|
|
if(!_isSelf(eventData) && eventData.data) {
|
|
if(!_isSelf(eventData) && eventData.data) {
|
|
|
|
+
|
|
|
|
+ // if the participant who left is in center view, switch center view to self
|
|
|
|
+ for (let i = 0; i < this.otherParticipants.length; i++) {
|
|
|
|
+ if (this.otherParticipants[i].uid === eventData.performer) {
|
|
|
|
+ if(this.mainViewParticipant.uid === (+this.otherParticipants[i].mediaServiceIdentifier)) {
|
|
|
|
+ this.showInCenterView(true, this.myMediaServiceIdentifier, 'You', 'PRO');
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
this.otherParticipants = this.otherParticipants.filter(_participant => {
|
|
this.otherParticipants = this.otherParticipants.filter(_participant => {
|
|
return _participant.uid !== eventData.performer;
|
|
return _participant.uid !== eventData.performer;
|
|
});
|
|
});
|