1
- [ ![ badge] ( https://img.shields.io/twitter/follow/api_video?style=social )] ( https://twitter.com/intent/follow?screen_name=api_video )
2
-
3
- [ ![ badge] ( https://img.shields.io/github/stars/apivideo/api.video-typescript-uploader?style=social )] ( https://github.com/apivideo/api.video-typescript-uploader )
4
-
5
- [ ![ badge] ( https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video )] ( https://community.api.video )
6
-
1
+ [ ![ badge] ( https://img.shields.io/twitter/follow/api_video?style=social )] ( https://twitter.com/intent/follow?screen_name=api_video )   ; [ ![ badge] ( https://img.shields.io/github/stars/apivideo/api.video-typescript-uploader?style=social )] ( https://github.com/apivideo/api.video-typescript-uploader )   ; [ ![ badge] ( https://img.shields.io/discourse/topics?server=https%3A%2F%2Fcommunity.api.video )] ( https://community.api.video )
7
2
![ ] ( https://github.com/apivideo/API_OAS_file/blob/master/apivideo_banner.png )
3
+ <h1 align =" center " >api.video typescript video uploader</h1 >
8
4
9
- [ api.video] ( https://api.video ) is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
10
-
11
- # api.video typescript video uploader
12
5
![ npm] ( https://img.shields.io/npm/v/@api.video/video-uploader ) ![ ts] ( https://badgen.net/badge/-/TypeScript/blue?icon=typescript&label )
13
6
7
+
8
+ [ 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.
9
+
10
+ # Table of contents
11
+
12
+ - [ Table of contents] ( #table-of-contents )
13
+ - [ Project description] ( #project-description )
14
+ - [ Getting started] ( #getting-started )
15
+ - [ Installation] ( #installation )
16
+ - [ Installation method #1 : requirejs] ( #installation-method-1-requirejs )
17
+ - [ Installation method #2 : typescript] ( #installation-method-2-typescript )
18
+ - [ Simple include in a javascript project] ( #simple-include-in-a-javascript-project )
19
+ - [ Documentation - Standard upload] ( #documentation---standard-upload )
20
+ - [ Instanciation] ( #instanciation )
21
+ - [ Options] ( #options )
22
+ - [ Using a delegated upload token (recommended):] ( #using-a-delegated-upload-token-recommended )
23
+ - [ Using an access token (discouraged):] ( #using-an-access-token-discouraged )
24
+ - [ Common options] ( #common-options )
25
+ - [ Example] ( #example )
26
+ - [ Methods] ( #methods )
27
+ - [ ` upload() ` ] ( #upload )
28
+ - [ ` onProgress() ` ] ( #onprogress )
29
+ - [ Documentation - Progressive upload] ( #documentation---progressive-upload )
30
+ - [ Instanciation] ( #instanciation-1 )
31
+ - [ Options] ( #options-1 )
32
+ - [ Using a delegated upload token (recommended):] ( #using-a-delegated-upload-token-recommended-1 )
33
+ - [ Using an access token (discouraged):] ( #using-an-access-token-discouraged-1 )
34
+ - [ Common options] ( #common-options-1 )
35
+ - [ Example] ( #example-1 )
36
+ - [ Methods] ( #methods-1 )
37
+ - [ ` uploadPart(file: Blob) ` ] ( #uploadpartfile-blob )
38
+ - [ ` uploadLastPart(file: Blob) ` ] ( #uploadlastpartfile-blob )
39
+ - [ ` onProgress() ` ] ( #onprogress-1 )
40
+
41
+ # Project description
42
+
14
43
Typescript library to upload videos to api.video using delegated upload token (or usual access token) from the front-end.
15
44
16
45
It allows you to upload videos in two ways:
17
46
- standard upload: to send a whole video file in one go
18
47
- progressive upload: to send a video file by chunks, without needing to know the final size of the video file
19
48
49
+ # Getting started
20
50
21
- # Installation
51
+ ## Installation
22
52
23
- ## Installation method #1 : requirejs
53
+ ### Installation method #1 : requirejs
24
54
25
55
If you use requirejs you can add the library as a dependency to your project with
26
56
@@ -46,7 +76,7 @@ var uploader = new ProgressiveUploader({
46
76
});
47
77
```
48
78
49
- ## Installation method #2 : typescript
79
+ ### Installation method #2 : typescript
50
80
51
81
If you use Typescript you can add the library as a dependency to your project with
52
82
@@ -73,7 +103,7 @@ const uploader = new ProgressiveUploader({
73
103
```
74
104
75
105
76
- ## Simple include in a javascript project
106
+ ### Simple include in a javascript project
77
107
78
108
Include the library in your HTML file like so:
79
109
@@ -100,7 +130,7 @@ Then, once the `window.onload` event has been trigered, create your player using
100
130
</script >
101
131
```
102
132
103
- # Usage - Standard upload
133
+ # Documentation - Standard upload
104
134
105
135
## Instanciation
106
136
@@ -161,7 +191,7 @@ The upload() method starts the upload. It takes no parameter. It returns a Promi
161
191
On success, the promise embeds the ` video ` object returned by the API.
162
192
On fail, the promise embeds the status code & error message returned by the API.
163
193
164
- #### Example
194
+ ** Example**
165
195
166
196
``` javascript
167
197
// ... uploader instanciation
@@ -182,7 +212,7 @@ An onProgress event contains the following attributes:
182
212
- currentChunk (number): index of the chunk being uploaded
183
213
- currentChunkUploadedBytes (number): number of bytes uploaded for the current chunk
184
214
185
- #### Example
215
+ ** Example**
186
216
187
217
``` javascript
188
218
// ... uploader instanciation
@@ -197,7 +227,7 @@ An onProgress event contains the following attributes:
197
227
});
198
228
```
199
229
200
- # Usage - Progressive upload
230
+ # Documentation - Progressive upload
201
231
202
232
203
233
## Instanciation
@@ -255,7 +285,7 @@ The upload() method starts the upload. It takes no parameter. It returns a Promi
255
285
On success, the promise embeds the ` video ` object returned by the API.
256
286
On fail, the promise embeds the status code & error message returned by the API.
257
287
258
- #### Example
288
+ ** Example**
259
289
260
290
``` javascript
261
291
// ... uploader instanciation
@@ -270,7 +300,7 @@ The upload() method starts the upload. It takes no parameter. It returns a Promi
270
300
On success, the promise embeds the ` video ` object returned by the API.
271
301
On fail, the promise embeds the status code & error message returned by the API.
272
302
273
- #### Example
303
+ ** Example**
274
304
275
305
``` javascript
276
306
// ... uploader instanciation
@@ -287,7 +317,7 @@ An onProgress event contains the following attributes:
287
317
- uploadedBytes (number): total number of bytes uploaded for this upload
288
318
- totalBytes (number): total size of the file
289
319
290
- #### Example
320
+ ** Example**
291
321
292
322
``` javascript
293
323
// ... uploader instanciation
0 commit comments