How can I implement to control a PTZ camera? Not with the virtual provided joystick. Or where can I look this up? Thank you!

I’m creating a plugin where I can select the camera and have left right buttons (currently the left button is logging it was moved), the buttons are working but the camera does not move.

Here is my code snippet:

this.MoveCamera = ReactiveCommand.Create<BtnCommands, Unit>(b =>

    {

      if (b == BtnCommands.Left)

      {

        // here comes the API stuff to actually turn it

        VideoOS.Platform.Messaging.Message msg = new VideoOS.Platform.Messaging.Message(MessageId.Control.PTZMoveCommand, VideoOS.Platform.Messaging.PTZMoveCommandData.Left);

        EnvironmentManager.Instance.SendMessage(msg, this.SelectedCamera.FQID);

      }

      else if (b == BtnCommands.Right)

      {

        // here comes the API stuff to actually turn it

      }

      return Unit.Default;

    });

  this.WhenAnyValue(x => x.SelectedCamera).Log(this, "Test").Subscribe();

  this.WhenAnyValue(b => b.MoveCamera).Log(this, "Moved?").Subscribe();

PTZ and Presets sample might be interesting for you, please explore the sample - https://doc.developer.milestonesys.com/html/index.html?base=samples/ptzandpresets_sample.html&tree=tree_2.html