Types

StartOptions

Property Type Default Required Description
source 'webcam'|'screen' 'screen' no Sets source of video input to capture – either the user's screen or webcam
mic boolean false no Set as true to capture user's mic audio (if true, browser will request microphone permission from user before first recording)

Size

Property Type Description
height number Height of the video in pixels
width number Width of the video in pixels

SubmitEventDetail

Properties

Property Type Description
viewUrl string Link to video hosted in your Hubcap account
videoMetadata VideoMetadata Additional details of recorded video

Methods

Method Returns Description
getDownloadUrl() Promise<string>: resolves with the generated URL Short-lived, authenticated URL pointing to the mp4 video file

The URL returned by getDownloadUrl() is non-guessable and authenticated using a short-lived authentication token, only valid for ~1 hour. As such, do not depend on the URL past the initial download.

VideoMetadata

Property Type Description
size Size Video dimensions in pixels
duration number Video duration in seconds (as floating-point number)