mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-03 22:35:45 +02:00
calloverlay: avoid flooding reset
Change-Id: Ic417ff896c002dd119974d4614caca6b659d1f34
This commit is contained in:
parent
731d2a515f
commit
b0f3bc5572
5 changed files with 3 additions and 12 deletions
|
@ -337,7 +337,6 @@ AvAdapter::isCapturing() const
|
|||
auto callId = lrcInstance_->getCurrentCallId();
|
||||
auto callModel = lrcInstance_->getCurrentCallModel();
|
||||
auto call = callModel->getCall(callId);
|
||||
// TODO enum
|
||||
for (const auto& m : call.mediaList) {
|
||||
if (m[DRing::Media::MediaAttributeKey::SOURCE].startsWith(
|
||||
DRing::Media::VideoProtocolPrefix::CAMERA)
|
||||
|
|
|
@ -692,7 +692,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
|
|||
bool isAudioMuted = callInfo->status == lrc::api::call::Status::PAUSED;
|
||||
bool isGrid = callInfo->layout == lrc::api::call::Layout::GRID;
|
||||
QString previewId {};
|
||||
bool isVideoMuted = false;
|
||||
if (callInfo->status != lrc::api::call::Status::ENDED) {
|
||||
for (const auto& media : callInfo->mediaList) {
|
||||
if (media[DRing::Media::MediaAttributeKey::MEDIA_TYPE]
|
||||
|
@ -702,8 +701,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
|
|||
if (previewId.isEmpty()) {
|
||||
previewId = media[DRing::Media::MediaAttributeKey::SOURCE];
|
||||
}
|
||||
isVideoMuted |= media[DRing::Media::MediaAttributeKey::SOURCE].startsWith(
|
||||
DRing::Media::VideoProtocolPrefix::CAMERA);
|
||||
}
|
||||
} else if (media[DRing::Media::MediaAttributeKey::LABEL] == "audio_0") {
|
||||
isAudioMuted |= media[DRing::Media::MediaAttributeKey::MUTED] == TRUE_STR;
|
||||
|
@ -714,7 +711,6 @@ CallAdapter::updateCallOverlay(const lrc::api::conversation::Info& convInfo)
|
|||
Q_EMIT updateOverlay(isPaused,
|
||||
isAudioOnly,
|
||||
isAudioMuted,
|
||||
isVideoMuted,
|
||||
accInfo.profileInfo.type == lrc::api::profile::Type::SIP,
|
||||
isGrid,
|
||||
previewId);
|
||||
|
|
|
@ -99,7 +99,6 @@ Q_SIGNALS:
|
|||
void updateOverlay(bool isPaused,
|
||||
bool isAudioOnly,
|
||||
bool isAudioMuted,
|
||||
bool isVideoMuted,
|
||||
bool isSIP,
|
||||
bool isGrid,
|
||||
const QString& previewId);
|
||||
|
|
|
@ -59,14 +59,11 @@ Item {
|
|||
|| callViewContextMenu.peerIsRecording
|
||||
}
|
||||
|
||||
function updateUI(isPaused, isAudioOnly, isAudioMuted,
|
||||
isVideoMuted, isSIP,
|
||||
isGrid) {
|
||||
function updateUI(isPaused, isAudioOnly, isAudioMuted, isSIP, isGrid) {
|
||||
if (isPaused !== undefined) {
|
||||
root.isPaused = isPaused
|
||||
root.isAudioOnly = isAudioOnly
|
||||
root.isAudioMuted = isAudioMuted
|
||||
root.isVideoMuted = isVideoMuted
|
||||
callViewContextMenu.isVideoMuted = root.isVideoMuted
|
||||
root.isSIP = isSIP
|
||||
root.isGrid = isGrid
|
||||
|
|
|
@ -283,7 +283,7 @@ Rectangle {
|
|||
Connections {
|
||||
target: CallAdapter
|
||||
|
||||
function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted, isVideoMuted,
|
||||
function onUpdateOverlay(isPaused, isAudioOnly, isAudioMuted,
|
||||
isSIP, isGrid, previewId) {
|
||||
if (previewId != "") {
|
||||
if (root.callPreviewId != previewId)
|
||||
|
@ -298,7 +298,7 @@ Rectangle {
|
|||
callOverlay.showOnHoldImage(isPaused)
|
||||
audioCallPageRectCentralRect.visible = !isPaused && root.isAudioOnly && participantsLayer.count === 0
|
||||
callOverlay.updateUI(isPaused, isAudioOnly,
|
||||
isAudioMuted, isVideoMuted,
|
||||
isAudioMuted,
|
||||
isSIP,
|
||||
isGrid)
|
||||
callOverlay.isVideoMuted = !AvAdapter.isCapturing()
|
||||
|
|
Loading…
Add table
Reference in a new issue