Firemonkey TCameraComponent settings restoring problem

  

I’ve problem with TCameraComponent (Delphi Rio 10.3.1), similar to this one:
Firemonkey TCameraComponent quality change when reactivated
but neither accepted answer nor comments suggestion work for me.

procedure TForm1.CameraOn;
begin
Camera := TCameraComponent.Create(Self);
Camera.Quality := TVideoCaptureQuality.LowQuality;
Camera.OnSampleBufferReady := CameraSampleBufferReady;
Camera.Active := True;
end;

procedure TForm1.CameraOff;
begin
Camera.Active := False;
Camera.OnSampleBufferReady := nil;
//Self.RemoveComponent(Camera);
//FreeAndNil(Camera);
Camera.DisposeOf;
Camera := nil;
end;

Setting quality to Low works only once. Then destroying and recreating TCameraComponent always restores quality settings to default (high). I’m quite aware of ARC issues with destroying objects, but none of methods I know work.

Comments are closed.