Last updated

cpRecordAPI

Gives developers full programmatic control over video recording using the user's webcam and microphone.

Include the Script

<script type="text/javascript" src="//wwwcdn.cincopa.com/_cms/ugc/recorder.js"></script>

Initialize the Recorder

var recorder = new cpRecordAPI(options);recorder.activate(); 

Parameters

  • options: Object to configure:
    • resolution: Set video resolution.
    • aspectRatio: Set the aspect ratio for recording.

Optional Methods

  • activate() - Prepares the recorder.
  • start() - Starts the live preview (camera feed).
  • record() - Starts recording.
  • stop() - Stops and finalizes recording.
  • reset() - Clears the current recording.
  • rerecord() - Starts a new recording session.
  • requestPermission() - Requests webcam/microphone access.
  • nowRecording() - Returns true if recording is active.
  • hasWebcam() / hasMicrophone() - Checks if user has devices.
  • setUploadUrl(url) - Sets where the recording should be uploaded.