Skip to content

Commit

Permalink
Add documentation CI
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Nov 10, 2023
1 parent 05e25cb commit 4773d3e
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion templates/documentation/sdks/vod/apivideo-typescript-uploader.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<!--
This file is automatically generated. DO NOT EDIT!
If you need to change this file, create a PR in the apivideo/api.video-typescript-uploader repository.
-->
---
title: api.video TypeScript video uploader
meta:
description: The official api.video TypeScript video uploader for api.video. [api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.
---

# api.video TypeScript video uploader
{% include "_partials/view-on-github-button.md" link: "https://github.com/apivideo/test-sdk-documentation-update" %}

[api.video](https://api.video/) is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

Expand Down Expand Up @@ -198,6 +203,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 +335,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 +345,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 +370,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](https://github.com/apivideo/api.video-typescript-uploader/blob/main/doc/UploaderStaticWrapper.md) class, which offers static method equivalents for all functionalities.

0 comments on commit 4773d3e

Please sign in to comment.