Set camera state on call creation in order to avoid using not wanted state while updating the call.

Cause: toggling screensharing will activate the camera if the call is a video call.
This commit is contained in:
Julien Wadel 2025-11-18 11:27:59 +01:00
parent 72e32ec160
commit 3c264fd3ee

View file

@ -321,6 +321,7 @@ bool ToolModel::createCall(const QString &sipAddress,
} }
std::shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr); std::shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr);
params->enableVideo(localVideoEnabled); params->enableVideo(localVideoEnabled);
params->enableCamera(localVideoEnabled);
auto videoDirection = localVideoEnabled ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly; auto videoDirection = localVideoEnabled ? linphone::MediaDirection::SendRecv : linphone::MediaDirection::RecvOnly;
params->setVideoDirection(videoDirection); params->setVideoDirection(videoDirection);