Add personal video calls - #16
Conversation
There was a problem hiding this comment.
💡 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 -> { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 👍 / 👎.
| if (call.isVideo) { | ||
| tdlib.context().calls().makeVideoCall(this, call.userId, null); | ||
| } else { | ||
| tdlib.context().calls().makeCall(this, call.userId, null); |
There was a problem hiding this comment.
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 👍 / 👎.
What changed
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
git diff --checkpassed