Skip to content
Snippets Groups Projects
Commit c0532c53 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

fix conference layout

Change-Id: Ica47f7a6baffc3952356ad569302acc035b2fdff
parent c578b3fe
Branches
Tags
No related merge requests found
...@@ -239,7 +239,7 @@ CVPixelBufferRef pixelBufferPreview; ...@@ -239,7 +239,7 @@ CVPixelBufferRef pixelBufferPreview;
return; return;
} }
if ([self isCurrentCall: confId]) { if ([self isCurrentCall: confId]) {
[self updateConference: confId]; [self updateConference];
} }
}); });
//monitor for updated call state //monitor for updated call state
...@@ -385,8 +385,9 @@ CVPixelBufferRef pixelBufferPreview; ...@@ -385,8 +385,9 @@ CVPixelBufferRef pixelBufferPreview;
participantsOverlays = [[NSMutableDictionary alloc] init]; participantsOverlays = [[NSMutableDictionary alloc] init];
} }
-(void)updateConference:(QString)confId -(void)updateConference
{ {
auto confId = [self getcallID];
if (confId.isEmpty()) { if (confId.isEmpty()) {
[self removeConferenceLayout]; [self removeConferenceLayout];
return; return;
...@@ -400,6 +401,7 @@ CVPixelBufferRef pixelBufferPreview; ...@@ -400,6 +401,7 @@ CVPixelBufferRef pixelBufferPreview;
[self removeConferenceLayout]; [self removeConferenceLayout];
return; return;
} }
NSMutableArray* participantUrs = [[NSMutableArray alloc] init];
for (auto participant: participants) { for (auto participant: participants) {
ConferenceParticipant conferenceParticipant; ConferenceParticipant conferenceParticipant;
conferenceParticipant.x = participant["x"].toFloat(); conferenceParticipant.x = participant["x"].toFloat();
...@@ -407,6 +409,7 @@ CVPixelBufferRef pixelBufferPreview; ...@@ -407,6 +409,7 @@ CVPixelBufferRef pixelBufferPreview;
conferenceParticipant.width = participant["w"].toFloat(); conferenceParticipant.width = participant["w"].toFloat();
conferenceParticipant.hight = participant["h"].toFloat(); conferenceParticipant.hight = participant["h"].toFloat();
conferenceParticipant.uri = participant["uri"].toNSString(); conferenceParticipant.uri = participant["uri"].toNSString();
[participantUrs addObject:participant["uri"].toNSString()];
conferenceParticipant.active = participant["active"] == "true"; conferenceParticipant.active = participant["active"] == "true";
conferenceParticipant.isLocal = false; conferenceParticipant.isLocal = false;
conferenceParticipant.bestName = participant["uri"].toNSString(); conferenceParticipant.bestName = participant["uri"].toNSString();
...@@ -433,6 +436,13 @@ CVPixelBufferRef pixelBufferPreview; ...@@ -433,6 +436,13 @@ CVPixelBufferRef pixelBufferPreview;
[overlay updateViewWithParticipant: conferenceParticipant]; [overlay updateViewWithParticipant: conferenceParticipant];
} }
} }
auto keys = [participantsOverlays allKeys];
for (auto key : keys) {
if (![participantUrs containsObject:key]) {
[participantsOverlays[key] removeFromSuperview];
participantsOverlays[key] = nil;
}
}
} }
-(void) updateCall -(void) updateCall
...@@ -465,7 +475,7 @@ CVPixelBufferRef pixelBufferPreview; ...@@ -465,7 +475,7 @@ CVPixelBufferRef pixelBufferPreview;
[recordOnOffButton setHidden:!confUid_.isEmpty()]; [recordOnOffButton setHidden:!confUid_.isEmpty()];
[holdOnOffButton setHidden:!confUid_.isEmpty()]; [holdOnOffButton setHidden:!confUid_.isEmpty()];
[movableBaseForView setHidden:!confUid_.isEmpty()]; [movableBaseForView setHidden:!confUid_.isEmpty()];
[self updateConference: confUid_]; [self updateConference];
[timeSpentLabel setStringValue:callModel->getFormattedCallDuration(callUid_).toNSString()]; [timeSpentLabel setStringValue:callModel->getFormattedCallDuration(callUid_).toNSString()];
if (refreshDurationTimer == nil) if (refreshDurationTimer == nil)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment