Skip to content
Snippets Groups Projects
Commit 43ab7e29 authored by Aline Gondim Santos's avatar Aline Gondim Santos
Browse files

fix: do not open camera after closing sharing

While in an audio only call, if a sharing is started and then stopped,
the camera was open.

Change-Id: I5af5f7c106c2c53a97ee6b754b0344c7ecb35526
parent 87acb931
No related branches found
No related tags found
No related merge requests found
......@@ -96,8 +96,7 @@ AvAdapter::shareEntireScreen(int screenNumber)
rect.width() * screen->devicePixelRatio(),
rect.height() * screen->devicePixelRatio());
auto callId = lrcInstance_->getCurrentCallId();
if (hasCamera())
muteCamera_ = !isCapturing();
muteCamera_ = !isCapturing();
lrcInstance_->getCurrentCallModel()
->addMedia(callId, resource, lrc::api::CallModel::MediaRequestType::SCREENSHARING);
}
......@@ -113,8 +112,7 @@ AvAdapter::shareAllScreens()
arrangementRect.width(),
arrangementRect.height());
auto callId = lrcInstance_->getCurrentCallId();
if (hasCamera())
muteCamera_ = !isCapturing();
muteCamera_ = !isCapturing();
lrcInstance_->getCurrentCallModel()
->addMedia(callId, resource, lrc::api::CallModel::MediaRequestType::SCREENSHARING);
}
......@@ -178,8 +176,7 @@ AvAdapter::shareFile(const QString& filePath)
{
auto callId = lrcInstance_->getCurrentCallId();
if (!callId.isEmpty()) {
if (hasCamera())
muteCamera_ = !isCapturing();
muteCamera_ = !isCapturing();
lrcInstance_->getCurrentCallModel()
->addMedia(callId, filePath, lrc::api::CallModel::MediaRequestType::FILESHARING);
}
......@@ -188,8 +185,7 @@ AvAdapter::shareFile(const QString& filePath)
void
AvAdapter::shareScreenArea(unsigned x, unsigned y, unsigned width, unsigned height)
{
if (hasCamera())
muteCamera_ = !isCapturing();
muteCamera_ = !isCapturing();
#ifdef Q_OS_LINUX
// xrectsel will freeze all displays too fast so that the call
// context menu will not be closed even closed signal is emitted
......@@ -224,8 +220,7 @@ AvAdapter::shareWindow(const QString& windowId)
auto resource = lrcInstance_->getCurrentCallModel()->getDisplay(windowId);
auto callId = lrcInstance_->getCurrentCallId();
if (hasCamera())
muteCamera_ = !isCapturing();
muteCamera_ = !isCapturing();
lrcInstance_->getCurrentCallModel()
->addMedia(callId, resource, lrc::api::CallModel::MediaRequestType::SCREENSHARING);
}
......
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