Skip to content

Added Support for VideoCalls, Screensharing and Optimized CPU Usage during calls#916

Open
Laky-64 wants to merge 43 commits intoTGX-Android:mainfrom
pytgcalls:main
Open

Added Support for VideoCalls, Screensharing and Optimized CPU Usage during calls#916
Laky-64 wants to merge 43 commits intoTGX-Android:mainfrom
pytgcalls:main

Conversation

@Laky-64
Copy link
Copy Markdown
Contributor

@Laky-64 Laky-64 commented Aug 30, 2025

The guide below provides the flow for creating a perfect pull request to the Telegram X Repository. Before submitting your PR, ensure that it complies with the following principles.
Screenshot_20250830_170202_NTgCallsX

Screen_Recording_20250830_170141_NTgCallsX.mp4

Perfect PRs must be:

  • Rational. This PR replaces the old TgCalls implementation with NTgCalls, adding full support for video calls and screen sharing, while also introducing a more efficient CPU usage management. To enable NTgCalls locally, you need to add the following line in your local.properties file:

    app.ntgcalls=true
    
  • Completed. All changes have been tested with one-to-one and group calls (both audio and video) as well as screen sharing sessions.
  • Up-To-Date. The PR is based on the latest commit of the 'main' branch.

When fixing issues, make sure that your PR is:

  • Sufficient. The new implementation fixes performance bottlenecks in the previous TgCalls integration, addressing high CPU usage and improving stability in long-running calls.
  • Separated. This PR only focuses on the migration to NTgCalls and the related improvements (video, screen sharing, CPU optimization). Other unrelated fixes are left for separate PRs.
  • Linked. If there is a specific issue in the tracker about calls performance or missing video support, it should be linked here (e.g., Closes #1234).
  • Creating. The new features have been tested across multiple devices to ensure they don’t break other parts of the app.
  • Consistent. Screenshots or video previews should be attached if there are UI changes related to video call and screen sharing interfaces.

When adding features, expect:

  • Discussion. Open to suggestions regarding UX/UI flow of video calls and screen sharing integration.
  • Dismissal. Not applicable yet, feature follows Telegram X’s style but can be refined if requested.

Other contributions:

  • Rational. Optimized the existing call system with better CPU management, ensuring reduced resource consumption during calls.
  • Improved. Code refactoring makes the call handling logic cleaner, more modular, and easier to maintain.
@pdkpv
Copy link
Copy Markdown

pdkpv commented Aug 31, 2025

Open to suggestions regarding UX/UI flow of video calls and screen sharing integration

In 2021, there was a competition for the design of audio/video calls, and this option seemed the most promising to many: https://contest.com/android-design/entry2997.

Maybe you can somehow come to an agreement with the author and take his design for your implementation.

@vkryl vkryl force-pushed the main branch 3 times, most recently from fbec9a8 to 8bb1443 Compare December 21, 2025 23:57
japananimetime added a commit to japananimetime/Telegram-X that referenced this pull request Jan 11, 2026
Cherry-picked Video Calls with Camera and Screen Sharing support.
- Added CallInterface abstraction layer
- Added NTgCallsInterface and TgCallsInterface implementations
- Added VoIPFloatingLayout and VoIPTextureView for video display
- Updated CallController with video button support
- Updated TGCallService with NTgCalls/TgCalls selection based on BuildConfig.USE_NTGCALLS

Based on commit 9513771 from Laky-64/Telegram-X PR TGX-Android#916

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
japananimetime added a commit to japananimetime/Telegram-X that referenced this pull request Jan 11, 2026
- Add BLUETOOTH_CONNECT and BLUETOOTH_SCAN permissions for Android 12+
- Add USE_NTGCALLS BuildConfig flag (controlled by app.ntgcalls in local.properties)
- Add useNTgCalls to ApplicationConfig and ConfigurationPlugin
- Add conditional NTgCalls dependency (io.github.pytgcalls:ntgcalls:2.0.6)

Note: The NTgCalls interface code from PR TGX-Android#916 requires API compatibility
updates - the PR was written for a different version of the NTgCalls library
with packages (media, p2p, devices, exceptions) that don't exist in the
public Maven Central release.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
logopek pushed a commit to logopek/reX that referenced this pull request Jan 11, 2026
Cherry-picked Video Calls with Camera and Screen Sharing support.
- Added CallInterface abstraction layer
- Added NTgCallsInterface and TgCallsInterface implementations
- Added VoIPFloatingLayout and VoIPTextureView for video display
- Updated CallController with video button support
- Updated TGCallService with NTgCalls/TgCalls selection based on BuildConfig.USE_NTGCALLS

Based on commit 9513771 from Laky-64/Telegram-X PR TGX-Android#916

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
logopek pushed a commit to logopek/reX that referenced this pull request Jan 11, 2026
- Add BLUETOOTH_CONNECT and BLUETOOTH_SCAN permissions for Android 12+
- Add USE_NTGCALLS BuildConfig flag (controlled by app.ntgcalls in local.properties)
- Add useNTgCalls to ApplicationConfig and ConfigurationPlugin
- Add conditional NTgCalls dependency (io.github.pytgcalls:ntgcalls:2.0.6)

Note: The NTgCalls interface code from PR TGX-Android#916 requires API compatibility
updates - the PR was written for a different version of the NTgCalls library
with packages (media, p2p, devices, exceptions) that don't exist in the
public Maven Central release.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
japananimetime added a commit to japananimetime/Telegram-X that referenced this pull request Jan 17, 2026
Cherry-picked Video Calls with Camera and Screen Sharing support.
- Added CallInterface abstraction layer
- Added NTgCallsInterface and TgCallsInterface implementations
- Added VoIPFloatingLayout and VoIPTextureView for video display
- Updated CallController with video button support
- Updated TGCallService with NTgCalls/TgCalls selection based on BuildConfig.USE_NTGCALLS

Based on commit 9513771 from Laky-64/Telegram-X PR TGX-Android#916

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
japananimetime added a commit to japananimetime/Telegram-X that referenced this pull request Jan 17, 2026
- Add BLUETOOTH_CONNECT and BLUETOOTH_SCAN permissions for Android 12+
- Add USE_NTGCALLS BuildConfig flag (controlled by app.ntgcalls in local.properties)
- Add useNTgCalls to ApplicationConfig and ConfigurationPlugin
- Add conditional NTgCalls dependency (io.github.pytgcalls:ntgcalls:2.0.6)

Note: The NTgCalls interface code from PR TGX-Android#916 requires API compatibility
updates - the PR was written for a different version of the NTgCalls library
with packages (media, p2p, devices, exceptions) that don't exist in the
public Maven Central release.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Laky-64 Laky-64 force-pushed the main branch 2 times, most recently from 64777e7 to 225c605 Compare January 22, 2026 12:46
Copy link
Copy Markdown

@hnitgyi034-source hnitgyi034-source left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@Laky-64 Laky-64 force-pushed the main branch 2 times, most recently from a1c1b9f to 1617e78 Compare February 2, 2026 02:19
japananimetime added a commit to japananimetime/Telegram-X that referenced this pull request Feb 8, 2026
Revert all 8 NTgCalls-related commits. The original developer
(Laky-64/null-nick) has made their own proper implementation,
so our custom cherry-picked version is no longer needed.

Reverted commits:
- 3e82450 Add NTgCalls integration from PR TGX-Android#916
- df7b562 Add NTgCalls build configuration and Bluetooth permissions
- 2695c8a Add group call support and voice/video restriction UI
- 5751cad Add Bluetooth runtime permission checks for Android 12+
- 7c23b5a Add video rendering to GroupCallController
- b341699 Add video chat management features
- 0169b97 Fix video chat API calls
- f544b6d Add Invite to Video Chat feature

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants