2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Fix video in calls working on tgcalls v2 implementation.

This commit is contained in:
John Preston
2021-11-15 12:08:56 +04:00
parent c7678f17ac
commit bf18907fe6
3 changed files with 5 additions and 7 deletions

View File

@@ -38,7 +38,6 @@ namespace tgcalls {
class InstanceImpl;
class InstanceV2Impl;
class InstanceImplLegacy;
class InstanceImplReference;
void SetLegacyGlobalServerConfig(const std::string &serverConfig);
} // namespace tgcalls
@@ -388,12 +387,15 @@ void Call::setupOutgoingVideo() {
_videoCaptureIsScreencast);
_videoCapture->setOutput(_videoOutgoing->sink());
}
_videoCapture->setState(tgcalls::VideoState::Active);
if (_instance) {
_instance->setVideoCapture(_videoCapture);
}
_videoCapture->setState(tgcalls::VideoState::Active);
} else if (_videoCapture) {
_videoCapture->setState(tgcalls::VideoState::Inactive);
if (_instance) {
_instance->setVideoCapture(nullptr);
}
}
}, _lifetime);
}