mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Check for at least one camera existance.
This commit is contained in:
parent
72861a6409
commit
f36240eb38
2 changed files with 6 additions and 2 deletions
|
@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "calls/calls_panel.h"
|
#include "calls/calls_panel.h"
|
||||||
#include "webrtc/webrtc_video_track.h"
|
#include "webrtc/webrtc_video_track.h"
|
||||||
|
#include "webrtc/webrtc_camera_utilities.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "facades.h"
|
#include "facades.h"
|
||||||
|
@ -348,7 +349,10 @@ void Call::setupOutgoingVideo() {
|
||||||
const auto started = _videoOutgoing->state();
|
const auto started = _videoOutgoing->state();
|
||||||
_videoOutgoing->stateValue(
|
_videoOutgoing->stateValue(
|
||||||
) | rpl::start_with_next([=](Webrtc::VideoState state) {
|
) | 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
|
&& state != started
|
||||||
&& !_videoCapture) {
|
&& !_videoCapture) {
|
||||||
_videoOutgoing->setState(started);
|
_videoOutgoing->setState(started);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 39234aa82a0bd0eceaf9b299a2debdb513ef7381
|
Subproject commit 4d0f0b8ef41b7a7f8014cebb1dbc5549b06fde6f
|
Loading…
Add table
Reference in a new issue