Skip to content

Add personal video calls - #16

Merged
AbdulKus merged 2 commits into
mainfrom
feature/personal-video-calls
Aug 11, 2026
Merged

Add personal video calls#16
AbdulKus merged 2 commits into
mainfrom
feature/personal-video-calls

Conversation

@AbdulKus

Copy link
Copy Markdown
Owner

What changed

  • adds one-to-one video call creation and acceptance through TDLib
  • connects the bundled tgcalls/WebRTC video capture and rendering pipeline
  • supports enabling video during a voice call, disabling it, and switching cameras
  • adds remote/local video layouts, paused-camera state, Russian/English labels, and speaker routing
  • adds camera-aware foreground service handling and picture-in-picture for active personal video calls
  • keeps group call code unchanged

Why

Frogram X previously created all private calls as audio-only even though its bundled TDLib, tgcalls, and WebRTC versions expose the required personal video APIs.

Validation

  • exact remote tree verified against the local commit tree
  • git diff --check passed
  • full Android/native release build delegated to this PR's GitHub Actions run because the local workspace has no Android SDK or Gradle distribution

@AbdulKus
AbdulKus marked this pull request as ready for review August 11, 2026 12:44
@AbdulKus
AbdulKus merged commit be4ec35 into main Aug 11, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e272fd7fe0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

int duration = getCallDuration(tdlib, callId);
Log.v(Log.TAG_VOIP, "#%d: DiscardCall, isDisconnect: %b, connectionId: %d, duration: %d", callId, isDisconnect, connectionId, duration);
tdlib.client().send(new TdApi.DiscardCall(callId, isDisconnect, null, Math.max(0, duration), false, connectionId), object -> {
tdlib.client().send(new TdApi.DiscardCall(callId, isDisconnect, null, Math.max(0, duration), call.isVideo, connectionId), object -> {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Record video use when discarding upgraded calls

When an audio call is upgraded through the new camera control, call.isVideo remains the creation-time flag because the upgrade only changes the native video capture state. Consequently, hanging up an originally audio call that later sent or received video reports is_video=false to TDLib, misclassifying the completed call. Track whether video was active at any point and pass that state when discarding.

Useful? React with 👍 / 👎.

} else if (id == R.id.menu_btn_call) {
if (userFull != null) {
tdlib.context().calls().makeCall(this, user.id, userFull);
tdlib.context().calls().makeCall(this, user.id, userFull, true);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Respect the disabled call-confirmation setting

When “Prompt before calling” is disabled, pressing the profile call button now hardcodes needPrompt=true and always opens a confirmation sheet. This is especially unnecessary for users who do not support video, where the sheet contains only the same audio-call confirmation that the setting explicitly disables; other call entry points still honor needOutboundCallsPrompt().

Useful? React with 👍 / 👎.

Comment on lines +918 to +921
if (call.isVideo) {
tdlib.context().calls().makeVideoCall(this, call.userId, null);
} else {
tdlib.context().calls().makeCall(this, call.userId, null);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Confirm video retries when call confirmation is enabled

When “Prompt before calling” is enabled and a finished video call is retried, this branch uses makeVideoCall, which hardcodes needPrompt=false, so the replacement call starts immediately. The audio retry branch still routes through makeCall and honors the setting, making video retries unexpectedly bypass the configured confirmation.

Useful? React with 👍 / 👎.

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.

1 participant