Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK DOC - test-sdk-documentation-update] Add action #131

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion sdks/vod/apivideo-typescript-uploader.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
This file is automatically generated. DO NOT EDIT!
If you need to change this file, edit the README file in the apivideo/test-sdk-documentation-update repo and create a PR.
-->
---
title: api.video TypeScript video uploader
meta:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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**

Expand All @@ -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.
Expand All @@ -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;
});
</script>
```
```


## 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.