Configuration

In API 2.0 configuration of the SDK is done using preferences and it is not tied to the setup.

API key

Pre API 2.0

Smartlook.setupAndStartRecording("YOUR_API_KEY");

API 2.0

Smartlook.instance.preferences.setProjectKey("your-unique-project-key");

Project key documentation.

Frame rate

Pre API 2.0

The Smartlook React Native SDK v1.x did not provide any controls over the SDK's recording frame rate.

API 2.0

Smartlook.instance.preferences.setFrameRate(2);

const frameRate = await Smartlook.instance.preferences.getFrameRate();

Frame rate documentation.

Rendering mode

Pre API 2.0

Smartlook.setRenderingMode(renderingMode: Smartlook.RenderingMode)

API 2.0

Smartlook.instance.state.setRenderingMode(renderingMode: SmartlookRenderingMode);

Rendering mode documentation.

Experimental flag

Pre API 2.0

The Smartlook React Native SDK v1.x did not provide any experimental flag controls.

API 2.0

Experimental flag was renamed to Surface recording on Android so it better describes its functionality. That is to enable the recording of TextureView and SurfaceView.

Smartlook.instance.preferences.setSurfaceCaptureEnabled(true);

const isSurfaceRecordingEnabled = await Smartlook.instance.state.getSurfaceCaptureEnabled();

Surface recording documentation.

Adaptive frame rate

Pre API 2.0

The Smartlook React Native SDK v1.x did not provide any adaptive frame rate controls.

API 2.0

Smartlook.instance.preferences.setAdaptiveFrameRateEnabled(true|false);

const isSurfaceRecordingEnabled = await Smartlook.instance.state.getSurfaceCaptureEnabled();

Adaptive frame rate documentation.

Event tracking modes

Pre API 2.0

Smartlook.setEventTrackingMode(eventTrackingMode: EventTrackingMode);
Smartlook.setEventTrackingModes(eventTrackingModes: Array<EventTrackingMode>);

API 2.0

Event tracking is no longer represented as a list of modes. They are rewritten with an easy-to-use API documented here.