Skip to content
Last updated

cpRecordUI

Embeds a complete visual recording interface—with camera preview, start/stop buttons, and auto-upload—into your webpage.

Record-ui

Include the Script

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

Initialize the Recorder UI

var recorderUI = new cpRecorderUI(element, options);recorderUI.start();

Parameters

  • element: The HTML container where the uploader will appear (e.g., a <div>).
  • options: An object for customization settings, such as:
    • upload_url: The server URL, where the component will try to upload recorded video..
    • width: The width of the component in pixels (by default - 780)
    • height: The height of the component in pixels (default - 400).
    • theme_color: The theme color of component (by default - #ccc)
    • autoUpload : start upload after recording (by default - true)
    • uploadWhileRecording : starting to upload while recording(by default - false)
    • resolution: The resolution of recorded video (by default - 480)
    • audioBitsPerSecond: by default - 128000
    • videoBitsPerSecond: by default - 2200000
    • frameRate - by default - 25
    • onUploadComplete: function which will be called when the file has been successfully uploaded

Callable Methods

  • start(): Create the component
    • Example: recorderUI.start();
  • reset(): Reset the component
    • Example: recorderUI.reset();