Skip to content
Snippets Groups Projects
Commit d74d57fb authored by Sébastien Blin's avatar Sébastien Blin
Browse files

calladapter: be able to maximize a specific screen instead uri

jami-project#1429

Change-Id: I341ae5dcce9c69eaec636271315b5403426e44bc
parent d9aee635
No related branches found
No related tags found
No related merge requests found
......@@ -739,7 +739,7 @@ CallAdapter::hangUpCall(const QString& callId)
}
void
CallAdapter::maximizeParticipant(const QString& uri)
CallAdapter::setActiveStream(const QString& uri, const QString& deviceId, const QString& streamId)
{
auto* callModel = lrcInstance_->getAccountInfo(accountId_).callModel.get();
const auto& convInfo
......@@ -755,15 +755,17 @@ CallAdapter::maximizeParticipant(const QString& uri)
bool removeActive = false;
for (auto part : participants) {
auto participant = part.toJsonObject();
auto isParticipant = participant[lrc::api::ParticipantsInfosStrings::URI].toString()
== uri;
auto puri = participant[lrc::api::ParticipantsInfosStrings::URI].toString();
auto pdeviceId = participant[lrc::api::ParticipantsInfosStrings::DEVICE].toString();
auto pstreamId = participant[lrc::api::ParticipantsInfosStrings::STREAMID].toString();
auto isParticipant = puri == uri && pdeviceId == deviceId && pstreamId == streamId;
auto active = participant[lrc::api::ParticipantsInfosStrings::ACTIVE].toBool();
if (active && !isParticipant) {
if (active && !isParticipant)
activeParticipants.push_back(participant);
}
if (isParticipant) {
auto deviceId = participant[lrc::api::ParticipantsInfosStrings::DEVICE].toString();
auto streamId = participant[lrc::api::ParticipantsInfosStrings::STREAMID].toString();
// Else, continue.
if (!active) {
callModel->setActiveStream(confId, uri, deviceId, streamId, true);
......
......@@ -60,7 +60,9 @@ public:
// For Call Overlay
Q_INVOKABLE void hangUpCall(const QString& callId);
Q_INVOKABLE void maximizeParticipant(const QString& uri);
Q_INVOKABLE void setActiveStream(const QString& uri,
const QString& deviceId,
const QString& streamId);
Q_INVOKABLE void minimizeParticipant(const QString& uri);
Q_INVOKABLE void showGridConferenceLayout();
Q_INVOKABLE void hangUpThisCall();
......@@ -76,7 +78,10 @@ public:
Q_INVOKABLE void muteCameraToggle();
Q_INVOKABLE bool isRecordingThisCall();
Q_INVOKABLE QVariantList getConferencesInfos() const;
Q_INVOKABLE void muteParticipant(const QString& accountUri, const QString& deviceId, const QString& sinkId, const bool state);
Q_INVOKABLE void muteParticipant(const QString& accountUri,
const QString& deviceId,
const QString& sinkId,
const bool state);
Q_INVOKABLE MuteStates getMuteState(const QString& uri) const;
Q_INVOKABLE void hangupParticipant(const QString& uri, const QString& deviceId);
Q_INVOKABLE void updateCall(const QString& convUid = {},
......
......@@ -89,7 +89,7 @@ RowLayout {
Layout.preferredWidth: buttonPreferredSize
Layout.alignment: Qt.AlignVCenter
source: JamiResources.open_in_full_24dp_svg
onClicked: CallAdapter.maximizeParticipant(uri)
onClicked: CallAdapter.setActiveStream(uri, deviceId, sinkId)
toolTipText: JamiStrings.maximizeParticipant
}
......
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