Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-qt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-qt
Commits
c02e33c2
Commit
c02e33c2
authored
4 years ago
by
Sébastien Blin
Browse files
Options
Downloads
Patches
Plain Diff
conference: handle participants without video
Change-Id: I266ab31e31d85b6cd94356b63368540c02e16c6f
parent
74bbebab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/calladapter.cpp
+7
-2
7 additions, 2 deletions
src/calladapter.cpp
src/mainview/components/CallOverlay.qml
+5
-0
5 additions, 0 deletions
src/mainview/components/CallOverlay.qml
src/mainview/components/ParticipantOverlay.qml
+39
-2
39 additions, 2 deletions
src/mainview/components/ParticipantOverlay.qml
with
51 additions
and
4 deletions
src/calladapter.cpp
+
7
−
2
View file @
c02e33c2
...
...
@@ -308,19 +308,24 @@ CallAdapter::connectCallModel(const QString& accountId)
data
[
"h"
]
=
participant
[
"h"
].
toInt
();
data
[
"uri"
]
=
participant
[
"uri"
];
data
[
"active"
]
=
participant
[
"active"
]
==
"true"
;
data
[
"videoMuted"
]
=
participant
[
"videoMuted"
]
==
"true"
;
data
[
"audioMuted"
]
=
participant
[
"audioMuted"
]
==
"true"
;
auto
bestName
=
participant
[
"uri"
];
data
[
"isLocal"
]
=
false
;
auto
&
accInfo
=
LRCInstance
::
accountModel
().
getAccountInfo
(
accountId_
);
if
(
bestName
==
accInfo
.
profileInfo
.
uri
)
{
bestName
=
tr
(
"me"
);
data
[
"isLocal"
]
=
true
;
if
(
participant
[
"videoMuted"
]
==
"true"
)
data
[
"avatar"
]
=
accInfo
.
profileInfo
.
avatar
;
}
else
{
try
{
auto
&
contact
=
LRCInstance
::
getCurrentAccountInfo
()
.
contactModel
->
getContact
(
participant
[
"uri"
]);
bestName
=
Utils
::
bestNameForContact
(
contact
);
}
catch
(...)
{
}
if
(
participant
[
"videoMuted"
]
==
"true"
)
data
[
"avatar"
]
=
contact
.
profileInfo
.
avatar
;
}
catch
(...)
{}
}
data
[
"bestName"
]
=
bestName
;
map
.
push_back
(
QVariant
(
data
));
...
...
This diff is collapsed.
Click to expand it.
src/mainview/components/CallOverlay.qml
+
5
−
0
View file @
c02e33c2
...
...
@@ -97,11 +97,16 @@ Rectangle {
console
.
log
(
"
Error when creating the hover
"
)
return
}
hover
.
setParticipantName
(
infos
[
infoVariant
].
bestName
)
hover
.
active
=
infos
[
infoVariant
].
active
;
hover
.
isLocal
=
infos
[
infoVariant
].
isLocal
;
hover
.
setMenuVisible
(
isMaster
)
hover
.
uri
=
infos
[
infoVariant
].
uri
if
(
infos
[
infoVariant
].
videoMuted
)
hover
.
setAvatar
(
infos
[
infoVariant
].
avatar
)
else
hover
.
setAvatar
(
""
)
hover
.
injectedContextMenu
=
participantContextMenu
participantOverlays
.
push
(
hover
)
}
...
...
This diff is collapsed.
Click to expand it.
src/mainview/components/ParticipantOverlay.qml
+
39
−
2
View file @
c02e33c2
...
...
@@ -37,6 +37,16 @@ Rectangle {
participantName
.
text
=
name
}
function
setAvatar
(
avatar
)
{
if
(
avatar
===
""
)
{
opacity
=
0
contactImage
.
source
=
""
}
else
{
opacity
=
1
contactImage
.
source
=
"
data:image/png;base64,
"
+
avatar
}
}
function
setMenuVisible
(
isVisible
)
{
optionsButton
.
visible
=
isVisible
}
...
...
@@ -53,6 +63,31 @@ Rectangle {
propagateComposedEvents
:
true
acceptedButtons
:
Qt
.
LeftButton
Image
{
id
:
contactImage
anchors.centerIn
:
parent
height
:
Math
.
min
(
parent
.
width
/
2
,
parent
.
height
/
2
)
width
:
Math
.
min
(
parent
.
width
/
2
,
parent
.
height
/
2
)
fillMode
:
Image
.
PreserveAspectFit
source
:
""
asynchronous
:
true
layer.enabled
:
true
layer.effect
:
OpacityMask
{
maskSource
:
Rectangle
{
width
:
contactImage
.
width
height
:
contactImage
.
height
radius
:
{
var
size
=
((
contactImage
.
width
<=
contactImage
.
height
)?
contactImage
.
width
:
contactImage
.
height
)
return
size
/
2
}
}
}
}
RowLayout
{
id
:
bottomLabel
...
...
@@ -130,11 +165,13 @@ Rectangle {
}
onEntered
:
{
root
.
state
=
"
entered
"
if
(
contactImage
.
status
===
Image
.
Null
)
root
.
state
=
"
entered
"
}
onExited
:
{
root
.
state
=
"
exited
"
if
(
contactImage
.
status
===
Image
.
Null
)
root
.
state
=
"
exited
"
}
}
...
...
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