Create

To access the api to record, you need to first create an instance of IScreenRecorder. ScreenRecorderBuilder provides a way to create IScreenRecorder instances for both Gif and Video.

Create Video Recorder

To create a video recorder IScreenRecorder instance, first you need to create an instance of VideoRecorderRuntimeSettings and pass it to ScreenRecorderBuilder.

Configuration

VideoRecorderRuntimeSettings provides a way to configure the video recorder. You can change the microphone status to enable or disable for the current recording.

Create settings instance
VideoRecorderRuntimeSettings settings = new VideoRecorderRuntimeSettings(enableMicrophone: true);

IScreenRecorder instance for Video

Once you create a VideoRecorderRuntimeSettings instance, pass it to ScreenRecorderBuilder to create an IScreenRecorder instance.

IScreenRecorder recorder;
//...
//...

// Create settings
VideoRecorderRuntimeSettings settings = new VideoRecorderRuntimeSettings(enableMicrophone: true);

// Pass settings to ScreenRecorderBuilder and build
ScreenRecorderBuilder builder = ScreenRecorderBuilder.CreateVideoRecorder(settings);
recorder = builder.Build();

Create GIF Recorder

Create a GIF recorder IScreenRecorder instance vis ScreenRecorderBuilder.

Configuration

You can pass Camera instance to builder if you want to record only a specific camera.

IScreenRecorder instance for GIF

You can either record a specific camera or complete screen with GIF recorder.

Camera Recording
IScreenRecorder recorder;
Camera cameraInstance;
//....
ScreenRecorderBuilder builder = ScreenRecorderBuilder.CreateGifRecorder(cameraInstance);
recorder = builder.Build();
Full Screen Recording
IScreenRecorder recorder;
//....

ScreenRecorderBuilder builder = ScreenRecorderBuilder.CreateGifRecorder();
recorder = builder.Build();

Last updated