Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jami-client-macos
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
savoirfairelinux
jami-client-macos
Commits
32cf6be8
Commit
32cf6be8
authored
Oct 28, 2019
by
Kateryna Kostiuk
Browse files
Options
Downloads
Patches
Plain Diff
call UI: highlight selected video input
Change-Id: I443f661028675c99ebdb180e1cf2254533a580b4
parent
9a2791a9
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/CurrentCallVC.mm
+12
-0
12 additions, 0 deletions
src/CurrentCallVC.mm
src/views/CallView.h
+1
-0
1 addition, 0 deletions
src/views/CallView.h
src/views/CallView.mm
+17
-0
17 additions, 0 deletions
src/views/CallView.mm
with
30 additions
and
0 deletions
src/CurrentCallVC.mm
+
12
−
0
View file @
32cf6be8
...
...
@@ -994,6 +994,18 @@ CVPixelBufferRef pixelBufferPreview;
return
mediaModel
->
getDevices
();
}
-
(
NSString
*
)
getDefaultDeviceName
{
auto
type
=
mediaModel
->
getCurrentRenderedDevice
(
callUid_
).
type
;
switch
(
type
)
{
case
lrc
::
api
::
video
::
DeviceType
::
CAMERA
:
return
@
(
mediaModel
->
getCurrentRenderedDevice
(
callUid_
).
name
.
c_str
());
case
lrc
::
api
::
video
::
DeviceType
::
DISPLAY
:
return
NSLocalizedString
(
@"Share screen"
,
@"Contextual menu entry"
);
default:
return
@""
;
}
}
-
(
void
)
switchToFile
:(
std
::
string
)
uri
{
mediaModel
->
setInputFile
(
QUrl
::
fromLocalFile
(
uri
.
c_str
()).
toLocalFile
().
toStdString
());
}
...
...
This diff is collapsed.
Click to expand it.
src/views/CallView.h
+
1
−
0
View file @
32cf6be8
...
...
@@ -30,6 +30,7 @@
-
(
void
)
switchToDevice
:(
int
)
deviceID
;
-
(
void
)
switchToFile
:(
std
::
string
)
uri
;
-
(
std
::
vector
<
std
::
string
>
)
getDeviceList
;
-
(
NSString
*
)
getDefaultDeviceName
;
@end
...
...
This diff is collapsed.
Click to expand it.
src/views/CallView.mm
+
17
−
0
View file @
32cf6be8
...
...
@@ -29,6 +29,8 @@
@end
@implementation
CallView
NSString
*
currentDevice
;
@synthesize
contextualMenu
;
@synthesize
shouldAcceptInteractions
;
...
...
@@ -174,6 +176,8 @@
auto
devices
=
[
self
.
callDelegate
getDeviceList
];
currentDevice
=
[
self
.
callDelegate
getDefaultDeviceName
];
for
(
int
i
=
0
;
i
<
devices
.
size
()
;
++
i
)
{
std
::
string
device
=
devices
[
i
];
[
contextualMenu
insertItemWithTitle
:
@
(
device
.
c_str
())
action
:
@selector
(
switchInput
:
)
keyEquivalent
:
@""
atIndex
:
i
];
...
...
@@ -191,6 +195,10 @@
atIndex:contextualMenu.itemArray.count];
#endif
auto
menuItem
=
[
contextualMenu
itemWithTitle
:
currentDevice
];
if
(
menuItem
)
{
[
menuItem
setState
:
NSControlStateValueOn
];
}
[
NSMenu
popUpContextMenu
:
contextualMenu
withEvent
:
theEvent
forView
:
self
];
}
...
...
@@ -224,17 +232,26 @@
-
(
void
)
switchInput
:(
NSMenuItem
*
)
sender
{
if
([
sender
.
title
isEqualToString
:
currentDevice
])
{
return
;
}
int
index
=
[
contextualMenu
indexOfItem
:
sender
];
[
self
.
callDelegate
switchToDevice
:
index
];
}
-
(
void
)
captureScreen
:(
NSMenuItem
*
)
sender
{
if
([
sender
.
title
isEqualToString
:
currentDevice
])
{
return
;
}
[
self
.
callDelegate
screenShare
];
}
-
(
void
)
chooseFile
:(
NSMenuItem
*
)
sender
{
if
([
sender
.
title
isEqualToString
:
currentDevice
])
{
return
;
}
NSOpenPanel
*
browsePanel
=
[[
NSOpenPanel
alloc
]
init
];
[
browsePanel
setDirectoryURL
:[
NSURL
URLWithString
:
NSHomeDirectory
()]];
[
browsePanel
setCanChooseFiles
:
YES
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment