Hello
How can I set the webcam resolution?
Thanks
Klaus
Hi,
Currently you can change this via the OnBeforeStart
event where you get access to the video
constraint objects that is sent to the camera device request.
procedure TForm3.WebCamera1BeforeStart(Sender: TObject;
var AConstraints: TJSObjectRecord);
begin
//Request the resolution to be at 1920x1080 if possible by using 'ideal'
//Use 'min' and 'max' to set the minimum or maximum resolution instead
AConstraints.jsobject.Properties['width'] := new(['ideal', 1920]);
AConstraints.jsobject.Properties['height'] := new(['ideal', 1080]);
end;
You can read more about constraints here.
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.