diff --git a/sdks/vod/apivideo-typescript-uploader.md b/sdks/vod/apivideo-typescript-uploader.md index 64386a02..12c1be9f 100644 --- a/sdks/vod/apivideo-typescript-uploader.md +++ b/sdks/vod/apivideo-typescript-uploader.md @@ -1,3 +1,7 @@ + --- title: api.video TypeScript video uploader meta: @@ -198,6 +202,11 @@ An onProgress event contains the following attributes: - currentChunk (number): index of the chunk being uploaded - currentChunkUploadedBytes (number): number of bytes uploaded for the current chunk +#### `cancel()` + +The cancel() method cancels the upload. It takes no parameter. + + **Example** ```javascript @@ -325,6 +334,7 @@ The onProgress() method let you defined an upload progress listener. It takes a An onProgress event contains the following attributes: - uploadedBytes (number): total number of bytes uploaded for this upload - totalBytes (number): total size of the file +- part (number): index of the part being uploaded **Example** @@ -334,9 +344,14 @@ An onProgress event contains the following attributes: uploader.onProgress((event) => { console.log(`total number of bytes uploaded for this upload: ${event.uploadedBytes}.`); console.log(`total size of the file: ${event.totalBytes}.`); + console.log(`current part: ${event.part}.`); }); ``` +#### `cancel()` + +The cancel() method cancels the upload. It takes no parameter. + #### `onPlayable()` The onPlayable() method let you defined a listener that will be called when the video is playable. It takes a callback function with one parameter: the `video` object returned by the API. @@ -354,4 +369,9 @@ The onPlayable() method let you defined a listener that will be called when the document.getElementById('player-container').innerHTML = v.assets.iframe; }); -``` \ No newline at end of file +``` + + +## Static wrapper + +For situations where managing object instances is impractical, consider using the [UploaderStaticWrapper](./doc/UploaderStaticWrapper.md) class, which offers static method equivalents for all functionalities. \ No newline at end of file