New JavaScript Events and Method for File Uploads
New Improvement FixYou can now follow and control uploads of existing files from your own code, with the main recording client and the legacy mobile recorder.
In the JavaScript Events API:
- NEW: the new
cancelUpload()method stops the upload in progress, the same way the Cancel upload link does. It returnstrueif an upload was cancelled andfalseif there was no upload in progress; - NEW: the new
onDesktopVideoUploadCancelled()andonVideoUploadCancelled()events trigger when the user clicks Cancel upload or your code callscancelUpload(); - NEW: the new
onDesktopVideoUploadRetrying()andonVideoUploadRetrying()events trigger when a retry attempt is scheduled, with the attempt number, the number of seconds until the retry will be triggered, and the reason for it (network,stalled,timeout,rateLimited,serverErrororinvalidResponse); - NEW: the new
onDesktopVideoUploadRegionFallback()andonVideoUploadRegionFallback()events trigger when an upload switches to the fallback region, with the host name of the upload server used from then on; - FIX:
onDesktopVideoUploadFailed()andonVideoUploadFailed()now trigger. They trigger whenever an upload ends without the recording being saved: when the file is refused before it is uploaded and when our upload servers refuse the upload. They now also receive a third parameter (details) with thestatus,codeandmessageof the error; - IMPROVEMENT:
onDesktopVideoUploadStarted()now triggers only once per file, including for a file that is refused before it is uploaded. Previously it triggered again for every retry attempt; - IMPROVEMENT:
onDesktopVideoUploadProgress()andonVideoUploadProgress()trigger once per whole percentage. Previously they could trigger many times with the same percentage.
The TypeScript types in the @addpipe/pipe-recording-client NPM package include the new methods, events and parameter.
Build slug: 89e4773ae
NPM version: 2.0.14