1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-08-26 09:43:56 +02:00

participantoverlay: add recording state

https://git.jami.net/savoirfairelinux/jami-daemon/-/issues/699

Change-Id: Ia480eef38ee054750ffbaf08ae0aed84090dc9a5
This commit is contained in:
Sébastien Blin 2022-10-06 10:18:24 -04:00
parent 6c8a5d7bc6
commit 31340bc224
No known key found for this signature in database
GPG key ID: C894BB01EEB2A9A9
9 changed files with 58 additions and 1 deletions

View file

@ -87,6 +87,8 @@ CallParticipantsModel::data(const QModelIndex& index, int role) const
return QVariant(item.value(HANDRAISED).toBool());
case Role::VoiceActivity:
return QVariant(item.value(VOICEACTIVITY).toBool());
case Role::IsRecording:
return QVariant(item.value(ISRECORDING).toBool());
}
return QVariant();
}

View file

@ -46,6 +46,7 @@
X(IsLocal) \
X(IsContact) \
X(VoiceActivity) \
X(IsRecording) \
X(HandRaised)
namespace CallParticipant {

View file

@ -322,6 +322,10 @@ Item {
property real lineEditContextMenuItemsWidth: 100
property real lineEditContextMenuSeparatorsHeight: 2
// Recording
property real recordingBtnSize: 12
property real recordingIndicatorSize: 24
//TimestampInfo
property int timestampLinePadding: 40
property int dayTimestampTopMargin: 30

View file

@ -58,6 +58,7 @@ Item {
property bool videoMuted: true
property bool voiceActive: false
property bool isLocalMuted: true
property bool isRecording: false
property bool meHost: CallAdapter.isCurrentHost()
property bool meModerator: CallAdapter.isModerator()
@ -331,6 +332,45 @@ Item {
radius: 5
}
Item {
id: recordingIndicator
visible: root.isRecording
z: participantRect.z + 1
width: JamiTheme.recordingIndicatorSize
height: shapeHeight
anchors.right: isRaiseHandIndicator.visible ? isRaiseHandIndicator.left : participantRect.right
anchors.top: participantRect.top
Rectangle {
anchors.centerIn: parent
height: JamiTheme.recordingBtnSize
width: JamiTheme.recordingBtnSize
radius: height / 2
color: JamiTheme.recordIconColor
SequentialAnimation on color {
loops: Animation.Infinite
running: recordingIndicator.visible
ColorAnimation {
from: JamiTheme.recordIconColor
to: "transparent"
duration: JamiTheme.recordBlinkDuration
}
ColorAnimation {
from: "transparent"
to: JamiTheme.recordIconColor
duration: JamiTheme.recordBlinkDuration
}
}
}
}
Rectangle {
id: alertMessage

View file

@ -65,6 +65,7 @@ Item {
participantIsActive: active_
isLocalMuted: audioLocalMuted_
voiceActive: voiceActive_
isRecording: isRecording_
participantIsModeratorMuted: audioModeratorMuted_
participantHandIsRaised: isHandRaised_

View file

@ -121,6 +121,7 @@ SplitView {
property bool audioModeratorMuted_: AudioModeratorMuted
property bool isHandRaised_: HandRaised
property bool voiceActive_: VoiceActivity
property bool isRecording_: IsRecording
}
}
}
@ -309,6 +310,7 @@ SplitView {
property bool audioModeratorMuted_: AudioModeratorMuted
property bool isHandRaised_: HandRaised
property bool voiceActive_: VoiceActivity
property bool isRecording_: IsRecording
}
}
}

View file

@ -216,6 +216,7 @@ SplitView {
property bool audioModeratorMuted_: AudioModeratorMuted
property bool isHandRaised_: HandRaised
property bool voiceActive_: VoiceActivity
property bool isRecording_: IsRecording
}
}
}
@ -290,6 +291,7 @@ SplitView {
property bool audioModeratorMuted_: AudioModeratorMuted
property bool isHandRaised_: HandRaised
property bool voiceActive_: VoiceActivity
property bool isRecording_: IsRecording
}
}
}

View file

@ -53,6 +53,7 @@ const QString AUDIOMODERATORMUTED = "audioModeratorMuted";
const QString ISMODERATOR = "isModerator";
const QString HANDRAISED = "handRaised";
const QString VOICEACTIVITY = "voiceActivity";
const QString ISRECORDING = "recording";
const QString STREAMID = "sinkId"; // TODO update
const QString BESTNAME = "bestName";
const QString ISLOCAL = "isLocal";
@ -83,6 +84,7 @@ struct ParticipantInfos
isModerator = infos[ParticipantsInfosStrings::ISMODERATOR] == "true";
handRaised = infos[ParticipantsInfosStrings::HANDRAISED] == "true";
voiceActivity = infos[ParticipantsInfosStrings::VOICEACTIVITY] == "true";
isRecording = infos[ParticipantsInfosStrings::ISRECORDING] == "true";
if (infos[ParticipantsInfosStrings::STREAMID].isEmpty())
sinkId = callId + uri + device;
@ -110,6 +112,7 @@ struct ParticipantInfos
bool isContact {false};
bool handRaised {false};
bool voiceActivity {false};
bool isRecording {false};
bool operator==(const ParticipantInfos& other) const
{
@ -118,7 +121,8 @@ struct ParticipantInfos
&& audioModeratorMuted == other.audioModeratorMuted && avatar == other.avatar
&& bestName == other.bestName && isContact == other.isContact
&& islocal == other.islocal && videoMuted == other.videoMuted
&& handRaised == other.handRaised && voiceActivity == other.voiceActivity;
&& handRaised == other.handRaised && voiceActivity == other.voiceActivity
&& isRecording == other.isRecording;
}
};

View file

@ -201,6 +201,7 @@ CallParticipants::toQJsonObject(uint index) const
ret[ParticipantsInfosStrings::ISCONTACT] = participant->isContact;
ret[ParticipantsInfosStrings::HANDRAISED] = participant->handRaised;
ret[ParticipantsInfosStrings::VOICEACTIVITY] = participant->voiceActivity;
ret[ParticipantsInfosStrings::ISRECORDING] = participant->isRecording;
ret[ParticipantsInfosStrings::CALLID] = callId_;
return ret;