Camera Preview Video Recording

Hi Developers,

I am using ionic 5 to develop mobile app. As part of app I am using camera preview plugin to preview and capture image. In the same way I need to capture video by previewing it, look like video recording as part of screen. I tried providing camera preview options and started camera and called startRecordVideo method with following options:

var options = {
      cameraDirection: this.camPreview.CAMERA_DIRECTION.FRONT,
      width: window.screen.width,
      height: window.screen.height - 205,
      quality: 100,
      withFlash: false

but camera has started but no video is getting recorded and I couldn`t see any video controls. If I call startRecordVideo method directly no preview error occured.

Can someone share me a solutions how to preview camera and start recording for certain duration.

Thanks in advance.

Can you provide a more complete example? Can you push a demo to github so we people can inspect it?

I cannot share any code. The thing is I am using ionic camera preview plugin. In ionviewwillenter() I called startCamera method and an interval of 2sec I called takePicture() worked properly. In the same way I called startRecordVideo method but I am not seeing anything getting recorded. This is what my requirement

Im not asking for you exact app, but a demo that shows the problem.

It can be a one page app that has the needed code/setup to run.