diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index c2d2a96045..f23e83b236 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "base/platform/base_platform_info.h" #include "calls/calls_panel.h" #include "webrtc/webrtc_video_track.h" +#include "webrtc/webrtc_camera_utilities.h" #include "data/data_user.h" #include "data/data_session.h" #include "facades.h" @@ -348,7 +349,10 @@ void Call::setupOutgoingVideo() { const auto started = _videoOutgoing->state(); _videoOutgoing->stateValue( ) | rpl::start_with_next([=](Webrtc::VideoState state) { - if (_state.current() != State::Established + if (state != Webrtc::VideoState::Inactive + && Webrtc::GetCamerasList().empty()) { + _videoOutgoing->setState(Webrtc::VideoState::Inactive); + } else if (_state.current() != State::Established && state != started && !_videoCapture) { _videoOutgoing->setState(started); diff --git a/Telegram/lib_webrtc b/Telegram/lib_webrtc index 39234aa82a..4d0f0b8ef4 160000 --- a/Telegram/lib_webrtc +++ b/Telegram/lib_webrtc @@ -1 +1 @@ -Subproject commit 39234aa82a0bd0eceaf9b299a2debdb513ef7381 +Subproject commit 4d0f0b8ef41b7a7f8014cebb1dbc5549b06fde6f