Skip to main content

Class: VideoUploadClient

Uploads a candidate video directly to Azure Blob Storage using a scoped SAS issued by the Recruiting API, then asks the API to commit the blob. The API never handles the video bytes — only the browser and Azure Blob Storage do.

Constructors​

Constructor​

new VideoUploadClient(baseUrl, backend?): VideoUploadClient

Parameters​

baseUrl​

string

backend?​

HttpBackend = fetchBackend

Returns​

VideoUploadClient

Methods​

upload()​

upload(customerId, transientCandidateId, file, durationSeconds, source, onProgress?): Promise<void>

Uploads the given file for the candidate identified by the transient GUID returned from createCandidate. Reports progress as blocks land. Throws VideoSasError or VideoUploadError on failure.

On retry after a failure the SAS cached in sessionStorage is reused (if still valid) so block uploads resume from the last successful block rather than restarting against a fresh blob.

Parameters​

customerId​

string

transientCandidateId​

string

file​

File

durationSeconds​

number

source​

VideoSource

onProgress?​

(done, total) => void

Returns​

Promise<void>