Skip to content
Snippets Groups Projects
Commit d18fa275 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

muting: add UI for audio/video muting

update icons for style homogeneity with the new icons for muting

Refs #75159

Change-Id: Idb946dcc987c08a529cc31a1157d7e6cc339577e
parent cfec2c95
No related branches found
No related tags found
No related merge requests found
......@@ -117,8 +117,12 @@ SET_SOURCE_FILES_PROPERTIES(${myApp_ICON} PROPERTIES
SET(ring_ICONS ${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_accept.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_call.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_cancel.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_email.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_new_email.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_hangup.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_hold.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_holdoff.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_mute_video.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_mute_audio.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_chat.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ic_action_search.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/ancrage.png
${CMAKE_CURRENT_SOURCE_DIR}/data/dark/audio.png
......
data/dark/ic_action_call.png

593 B | W: | H:

data/dark/ic_action_call.png

574 B | W: | H:

data/dark/ic_action_call.png
data/dark/ic_action_call.png
data/dark/ic_action_call.png
data/dark/ic_action_call.png
  • 2-up
  • Swipe
  • Onion skin
data/dark/ic_action_chat.png

248 B

data/dark/ic_action_email.png

353 B

data/dark/ic_action_hangup.png

515 B

data/dark/ic_action_hold.png

109 B

data/dark/ic_action_holdoff.png

265 B

data/dark/ic_action_mute_audio.png

671 B

data/dark/ic_action_mute_video.png

375 B

data/dark/ic_action_new_email.png

447 B

......@@ -64,6 +64,10 @@
@property (unsafe_unretained) IBOutlet NSButton *hangUpButton;
@property (unsafe_unretained) IBOutlet NSButton *recordOnOffButton;
@property (unsafe_unretained) IBOutlet NSButton *pickUpButton;
@property (unsafe_unretained) IBOutlet NSButton *muteAudioButton;
@property (unsafe_unretained) IBOutlet NSButton *muteVideoButton;
@property (unsafe_unretained) IBOutlet NSTextField *timeSpentLabel;
@property (unsafe_unretained) IBOutlet NSView *controlsPanel;
@property (unsafe_unretained) IBOutlet NSSplitView *splitView;
......@@ -84,21 +88,10 @@
@end
@implementation CurrentCallVC
@synthesize personLabel;
@synthesize actionHash;
@synthesize stateLabel;
@synthesize holdOnOffButton;
@synthesize hangUpButton;
@synthesize recordOnOffButton;
@synthesize pickUpButton;
@synthesize chatButton;
@synthesize timeSpentLabel;
@synthesize controlsPanel;
@synthesize videoView;
@synthesize videoLayer;
@synthesize previewLayer;
@synthesize previewView;
@synthesize splitView;
@synthesize personLabel, actionHash, stateLabel, holdOnOffButton, hangUpButton,
recordOnOffButton, pickUpButton, chatButton, timeSpentLabel,
muteVideoButton, muteAudioButton, controlsPanel, videoView,
videoLayer, previewLayer, previewView, splitView;
@synthesize previewHolder;
@synthesize videoHolder;
......@@ -120,7 +113,9 @@
[a setState:(idx.data(Qt::CheckStateRole) == Qt::Checked) ? NSOnState : NSOffState];
if(action == UserActionModel::Action::HOLD) {
[a setTitle:(a.state == NSOnState ? @"Hold off" : @"Hold")];
NSString* imgName = (a.state == NSOnState ? @"ic_action_holdoff" : @"ic_action_hold");
[a setImage:[NSImage imageNamed:imgName]];
}
if(action == UserActionModel::Action::RECORD) {
[a setTitle:(a.state == NSOnState ? @"Record off" : @"Record")];
......@@ -201,6 +196,8 @@
actionHash[ (int)UserActionModel::Action::HOLD ] = holdOnOffButton;
actionHash[ (int)UserActionModel::Action::RECORD] = recordOnOffButton;
actionHash[ (int)UserActionModel::Action::HANGUP] = hangUpButton;
actionHash[ (int)UserActionModel::Action::MUTE_AUDIO] = muteAudioButton;
actionHash[ (int)UserActionModel::Action::MUTE_VIDEO] = muteVideoButton;
videoLayer = [CALayer layer];
[videoView setWantsLayer:YES];
......@@ -274,7 +271,6 @@
&Call::videoStarted,
[=](Video::Renderer* renderer) {
NSLog(@"Video started!");
QObject::disconnect(self.videoStarted);
[self connectVideoRenderer:renderer];
});
......@@ -518,6 +514,18 @@
[chatButton setState:rightViewCollapsed];
}
- (IBAction)muteAudio:(id)sender
{
UserActionModel* uam = CallModel::instance()->userActionModel();
uam << UserActionModel::Action::MUTE_AUDIO;
}
- (IBAction)muteVideo:(id)sender
{
UserActionModel* uam = CallModel::instance()->userActionModel();
uam << UserActionModel::Action::MUTE_VIDEO;
}
#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.
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment