fix call activate video when create call

This commit is contained in:
gaelle 2025-04-11 09:48:00 +02:00
parent 0966c5ac17
commit fcf88315ab
2 changed files with 2 additions and 2 deletions

View file

@ -109,7 +109,7 @@ CallCore::CallCore(const std::shared_ptr<linphone::Call> &call) : QObject(nullpt
mIsStarted = mDuration > 0;
mMicrophoneMuted = call->getMicrophoneMuted();
mSpeakerMuted = call->getSpeakerMuted();
auto videoDirection = call->getCurrentParams()->getVideoDirection();
auto videoDirection = call->getParams()->getVideoDirection();
mLocalVideoEnabled =
videoDirection == linphone::MediaDirection::SendOnly || videoDirection == linphone::MediaDirection::SendRecv;
auto remoteParams = call->getRemoteParams();

View file

@ -182,7 +182,7 @@ bool ToolModel::createCall(const QString &sipAddress,
SettingsModel::getInstance()->setCallToneIndicationsEnabled(true);
}
std::shared_ptr<linphone::CallParams> params = core->createCallParams(nullptr);
if (localVideoEnabled) CallModel::activateLocalVideo(params, localVideoEnabled);
CallModel::activateLocalVideo(params, localVideoEnabled);
bool micEnabled = options.contains("microEnabled") ? options["microEnabled"].toBool() : true;
params->enableMic(micEnabled);