-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Fixed video recording problem on desktop. #30114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
| if (s.empty()) { | ||
| // empty means "default" — keep it as the first option if nothing else | ||
| // but avoid duplicate empties | ||
| if (std::find(candidates.begin(), candidates.end(), std::string()) == candidates.end()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ranges::find
| // Build candidate device IDs: original first, then simple heuristics to | ||
| // prefer non-IR / RGB variants (common naming pattern: "... I" vs "... R", | ||
| // or "IR" tokens). These heuristics are intentionally conservative. | ||
| const std::string base = startDeviceId.toStdString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const auto ...
Please report back when you test, most likely the code has to be moved to lib_webrtc, that's where the logic of creating the camera list resides |
Sorry I am replying really late, I am not able to build the telegram on my machine because I am really confused about getting the API access to build and test the program! I tried to submit my application but there was an error which I don't know. can you please help me with that??? |
|
Use |
Description
This PR improves webcam initialization on Linux when starting video message recording.
Some USB webcams (notably devices exposing both RGB and IR entries, e.g. Lenovo 510) take longer to initialize or expose multiple device names (… I / … R). Telegram Desktop may time out or select the IR entry first, causing “Could not start video recording. Please check your camera.” even though the camera works correctly.
Changes
Results:
NOT TESTED YET