Skip to content

Calls: enable audio sharing flow on Linux#30278

Merged
john-preston merged 1 commit intotelegramdesktop:devfrom
paterkleomenis:linux-share-audio
Mar 5, 2026
Merged

Calls: enable audio sharing flow on Linux#30278
john-preston merged 1 commit intotelegramdesktop:devfrom
paterkleomenis:linux-share-audio

Conversation

@paterkleomenis
Copy link
Contributor

@paterkleomenis paterkleomenis commented Feb 13, 2026

Enables the desktop share audio flow on Linux within Calls UI and plumbing.

Summary

  • Source handling: added unique-source handling for the desktop capture chooser.
  • UI wiring: updated calls and group panel wiring for the Linux audio sharing flow.
  • Group call UX: added screencast-only fullscreen mode and clarified voice vs screen-share audio controls.

Depends on desktop-app/lib_webrtc#22
Closes #26642

@CLAassistant
Copy link

CLAassistant commented Feb 13, 2026

CLA assistant check
All committers have signed the CLA.

@ilya-fedin
Copy link
Contributor

Something is wrong, that's what I see instead of the screen chooser with this PR:

That's what I see on the release version:

@ilya-fedin
Copy link
Contributor

Ah, got it, the screen chooser appears after clicking SHARE SCREEN.

@ilya-fedin
Copy link
Contributor

Wow, works wonderfully. I thought this would require something like a device selector for monitor sources as I thought it's not possible to know which monitor device is the right one.

@ilya-fedin
Copy link
Contributor

Please remove lib_webrtc update commits, it will have to be updated to the upstream commit when the lib_webrtc PR is merged. For now, add Depends on <link to the webrtc PR>. Please also add Closes #26642.

@ilya-fedin
Copy link
Contributor

Calls: clarify voice vs screen-share audio controls is a new feature, right? If yes, please move it to a separate PR

@paterkleomenis
Copy link
Contributor Author

Calls: clarify voice vs screen-share audio controls is a new feature, right? If yes, please move it to a separate PR

it's done.

@ilya-fedin
Copy link
Contributor

it's done.

Did you see my comment in the lib_webrtc PR?

@paterkleomenis
Copy link
Contributor Author

it's done.

Did you see my comment in the lib_webrtc PR?

Sorry, i didn't see it, i will make the changes right now.

@ilya-fedin
Copy link
Contributor

Depends on desktop-app/lib_webrtc#22

This now depends on a closed PR

@paterkleomenis
Copy link
Contributor Author

Depends on desktop-app/lib_webrtc#22

This now depends on a closed PR

i reopened it

@ilya-fedin
Copy link
Contributor

Doesn't build anymore

[build] In file included from /usr/src/tdesktop/Telegram/SourceFiles/calls/calls_top_bar.cpp:23:
[build] /usr/src/tdesktop/Telegram/SourceFiles/calls/calls_call.h:16:10: fatal error: webrtc/webrtc_system_audio_capture.h: No such file or directory
[build]    16 | #include "webrtc/webrtc_system_audio_capture.h"
[build]       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@paterkleomenis
Copy link
Contributor Author

There was a mistake, now it has been resolved.

@john-preston
Copy link
Member

@paterkleomenis Thank you for your effort. I've merged the submodule PR already, but this one I can't let in the release, sorry.

Maybe I'm missing something, but for me we shouldn't try to support the unique source case inside ChooseSourceProcess case with this weird look of "very wide window with small height with checkbox then couple of buttons". It feels that we should revert all changes to ChooseSourceProcess here and instead of calling:

Ui::DesktopCapture::ChooseSource(this);

To show it in this newly added mode, we should do something like:

uiShow()->show(Box([=](not_null<Ui::GenericBox*> box) {
  box->setTitle("Sharing options"); // from tr:: of course
  box->add(object_ptr<Ui::Checkbox>("Share system audio"));
  box->addButton("Choose source");
  box->addButton("Cancel");
}));

Connect everything and that's all. This will give us nice native inside-the-call-panel small box with this checkbox as body and more understandable button "Choose source" so we press it and start sharing with unique device id and see the choose source system interface.

Do I miss something?

@john-preston
Copy link
Member

By the way, you can contact me at https://t.me/preston discussing serious changes in code (and especially anything touching UI) should be done on Telegram, we have English-only contributors group or we can discuss stuff directly, in case it doesn't concern anyone except me.

@ilya-fedin
Copy link
Contributor

the group: https://t.me/tdesktop_contributions

@paterkleomenis paterkleomenis force-pushed the linux-share-audio branch 2 times, most recently from 20b34d8 to 985878e Compare March 4, 2026 18:12
Enables the desktop share audio flow on Linux within Calls UI and plumbing.

- calls_call: add withAudio parameter to toggleScreenSharing, track
  _screenWithAudio flag, create/destroy SystemAudioCapture when sharing
  starts with audio, and clean it up in destroyController.

- calls_panel / calls_group_panel: use LoopbackAudioCaptureSupported()
  to report audio support on all platforms; show a GenericBox with audio
  toggle when a unique desktop capture source is available (PipeWire),
  then start sharing with the chosen audio setting.

Depends on desktop-app/lib_webrtc#22
Closes telegramdesktop#26642
@john-preston john-preston merged commit f8fc995 into telegramdesktop:dev Mar 5, 2026
1 check passed
@john-preston
Copy link
Member

john-preston commented Mar 5, 2026

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make screencasting with audio work on Linux

4 participants