A collection of constants used in the Viro Platform.

Example use:


Video Recording/Screenshot Errors

import { ViroRecordingErrorConstants } from '@viro-community/react-viro';

if (returnValue == ViroRecordingErrorConstants.RECORD_ERROR_NONE) {
RECORD_ERROR_NONE-1Indicates that there is no error.
RECORD_ERROR_UNKNOWN0Indicates that the platform encountered an unknown error.
RECORD_ERROR_NO_PERMISSION1The user has denied permission required for recording/saving videos/screenshots.
RECORD_ERROR_INITIALIZATION2Indicates there was an error during initialization.
RECORD_ERROR_WRITE_TO_FILE3Indicates that there was an error writing to file.
RECORD_ERROR_ALREADY_RUNNING4Indicates that the system is already recording.
RECORD_ERROR_ALREADY_STOPPED5Indicates that the system is not currently recording.

AR Tracking States for ARScene

import { 
} from '@viro-community/react-viro';

if (returnValue == ViroTrackingStateConstants.TRACKING_LIMITED) {
  if (reason == ViroARTrackingReasonConstants.TRACKING_REASON_EXCESSIVE_MOTION) {
    console.log("Stop shaking the camera so hard!");
TRACKING_UNAVAILABLE1AR Camera position is not available.
TRACKING_LIMITED2Tracking is available but quality of results can be may be wildly inaccurate and should generally not be used
TRACKING_NORMAL3Camera position tracking is providing optimal results.
TRACKING_REASON_NONE1The current tracking state is not limited.
TRACKING_REASON_EXCESSIVE_MOTION2The device is moving too fast for accurate image-based position tracking.
TRACKING_REASON_INSUFFICIENT_FEATURES3The scene visible to the camera does not contain enough distinguishable features for image-based position tracking.