mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Start sharing without source choosing in case of PipeWire.
This commit is contained in:
@@ -53,6 +53,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "apiwrap.h" // api().kickParticipant.
|
#include "apiwrap.h" // api().kickParticipant.
|
||||||
#include "webrtc/webrtc_video_track.h"
|
#include "webrtc/webrtc_video_track.h"
|
||||||
|
#include "webrtc/webrtc_media_devices.h" // UniqueDesktopCaptureSource.
|
||||||
#include "styles/style_calls.h"
|
#include "styles/style_calls.h"
|
||||||
#include "styles/style_layers.h"
|
#include "styles/style_layers.h"
|
||||||
|
|
||||||
@@ -1349,7 +1350,15 @@ void Panel::chooseShareScreenSource() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto choose = [=] {
|
const auto choose = [=] {
|
||||||
Ui::DesktopCapture::ChooseSource(this);
|
if (const auto source = Webrtc::UniqueDesktopCaptureSource()) {
|
||||||
|
if (_call->isSharingScreen()) {
|
||||||
|
_call->toggleScreenSharing(std::nullopt);
|
||||||
|
} else {
|
||||||
|
chooseSourceAccepted(*source);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Ui::DesktopCapture::ChooseSource(this);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const auto screencastFromPeer = [&]() -> PeerData* {
|
const auto screencastFromPeer = [&]() -> PeerData* {
|
||||||
for (const auto &[endpoint, track] : _call->activeVideoTracks()) {
|
for (const auto &[endpoint, track] : _call->activeVideoTracks()) {
|
||||||
|
2
Telegram/ThirdParty/tgcalls
vendored
2
Telegram/ThirdParty/tgcalls
vendored
Submodule Telegram/ThirdParty/tgcalls updated: 98bef190cc...d78c12c9ca
Submodule Telegram/lib_webrtc updated: 26ed210ad2...45008adcd9
Reference in New Issue
Block a user