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

call: add option to set grid layout in conference

Change-Id: I61dffef25a1854f0cf78ab23f409e77bb5c6572c
parent 07b87e09
Branches
Tags
No related merge requests found
......@@ -61,7 +61,6 @@ set(SHADERS_FILE "Shader.metallib")
add_custom_command (OUTPUT ${CMAKE_SOURCE_DIR}/Shader.metallib
COMMAND ${CMAKE_SOURCE_DIR}/generateShaderLib.sh
COMMENT "Creating Shader.metallib")
add_custom_target(shader ALL
DEPENDS ${CMAKE_SOURCE_DIR}/Shader.metallib)
......@@ -394,6 +393,7 @@ ${CMAKE_CURRENT_SOURCE_DIR}/data/light/ic_moderator_audio_muted.png
${CMAKE_CURRENT_SOURCE_DIR}/data/light/ic_moderator_audio_unmuted.png
${CMAKE_CURRENT_SOURCE_DIR}/data/light/settings.png
${CMAKE_CURRENT_SOURCE_DIR}/data/light/plugin.png
${CMAKE_CURRENT_SOURCE_DIR}/data/light/mozaic.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_call.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_plugin.png
)
......
data/light/mozaic.png

208 B

......@@ -113,6 +113,8 @@ typedef enum {
@property (unsafe_unretained) IBOutlet IconButton* inputAudioMenuButton;
@property (unsafe_unretained) IBOutlet IconButton* outputAudioMenuButton;
@property (unsafe_unretained) IBOutlet IconButton* videoMenuButton;
@property (unsafe_unretained) IBOutlet IconButton* mozaicLayoutButton;
@property (unsafe_unretained) IBOutlet NSView* mozaicLayoutView;
// Video
@property (unsafe_unretained) IBOutlet CallView *videoView;
......@@ -155,6 +157,7 @@ NSInteger const PREVIEW_HEIGHT = 130;
NSInteger const HIDE_PREVIEW_BUTTON_SIZE = 25;
NSInteger const PREVIEW_MARGIN = 20;
BOOL allModeratorsInConference = false;
BOOL displayGridLayoutButton = false;
@synthesize holdOnOffButton, hangUpButton, recordOnOffButton, pickUpButton, chatButton, addParticipantButton, timeSpentLabel, muteVideoButton, muteAudioButton, controlsPanel, headerContainer, videoView, previewView, splitView, loadingIndicator, backgroundImage, bluerBackgroundEffect, hidePreviewButton, hidePreviewBackground, movableBaseForView, infoContainer, contactPhoto, contactNameLabel, callStateLabel, contactIdLabel, cancelCallButton, headerGradientView, controlsStackView, callingWidgetsContainer, brokerPopoverVC, audioOutputButton, inputAudioMenuButton, outputAudioMenuButton, videoMenuButton, pluginButton,muteVideoButtonContainer, shareButton;
......@@ -426,6 +429,7 @@ CVPixelBufferRef pixelBufferPreview;
participantsOverlays = [[NSMutableDictionary alloc] init];
allModeratorsInConference = false;
movableBaseForView.hidden = false;
displayGridLayoutButton = false;
}
-(void)updateConference
......@@ -452,6 +456,7 @@ CVPixelBufferRef pixelBufferPreview;
allModerators = false;
}
}
displayGridLayoutButton = call.layout != lrc::api::call::Layout::GRID;
movableBaseForView.hidden = true;
allModeratorsInConference = allModerators;
for (auto participant: participants) {
......@@ -499,6 +504,8 @@ CVPixelBufferRef pixelBufferPreview;
participantsOverlays[key] = nil;
}
}
self.mozaicLayoutView.hidden = !displayGridLayoutButton;
self.mozaicLayoutButton.enabled = displayGridLayoutButton;
}
-(void) updateCall
......@@ -528,6 +535,8 @@ CVPixelBufferRef pixelBufferPreview;
[self setupContactInfo:contactPhoto];
confUid_ = conversation.confId;
[self updateConference];
self.mozaicLayoutView.hidden = !displayGridLayoutButton;
self.mozaicLayoutButton.enabled = displayGridLayoutButton;
[timeSpentLabel setStringValue:callModel->getFormattedCallDuration(callUid_).toNSString()];
if (refreshDurationTimer == nil)
......@@ -1327,6 +1336,15 @@ CVPixelBufferRef pixelBufferPreview;
[self presentPopoverVCOfType: share sender: sender];
}
- (IBAction)setGridLayout:(id)sender {
if (accountInfo_ == nil)
return;
auto* callModel = accountInfo_->callModel.get();
if (not callModel->hasCall([self getcallID]))
return;
callModel->setConferenceLayout([self getcallID], lrc::api::call::Layout::GRID);
}
#pragma mark - NSSplitViewDelegate
/* Return YES if the subview should be collapsed because the user has double-clicked on an adjacent divider. If a split view has a delegate, and the delegate responds to this message, it will be sent once for the subview before a divider when the user double-clicks on that divider, and again for the subview after the divider, but only if the delegate returned YES when sent -splitView:canCollapseSubview: for the subview in question. When the delegate indicates that both subviews should be collapsed NSSplitView's behavior is undefined.
......
......@@ -218,6 +218,7 @@ NSString* BLINK_ANIMATION_IDENTIFIER = @"blinkAnimation";
[style setLineBreakMode:NSLineBreakByWordWrapping];
[style setAlignment:NSCenterTextAlignment];
att = [[NSDictionary alloc] initWithObjectsAndKeys:
self.font,NSFontAttributeName,
style, NSParagraphStyleAttributeName,
tintColor,
NSForegroundColorAttributeName, nil];
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment