You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constliveStreamId='vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the live stream you want to retrieve analytics for.
23
-
constperiod='2019-01-01'; // Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\"
23
+
constperiod='2019-01-01'; // Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\"
24
24
constcurrentPage='2'; // Choose the number of search results to return per page. Minimum value: 1
25
25
constpageSize='30'; // Results per page. Allowed values 1-100, default is 25.
**liveStreamId** | **string**| The unique identifier for the live stream you want to retrieve analytics for. | [default to undefined]
41
-
**period** | **string**| Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\" | [optional][default to undefined]
41
+
**period** | **string**| Period must have one of the following formats: - For a day : \"2018-01-01\", - For a week: \"2018-W01\", - For a month: \"2018-01\" - For a year: \"2018\" For a range period: - Date range: \"2018-01-01/2018-01-15\" | [optional][default to undefined]
42
42
**currentPage** | **number**| Choose the number of search results to return per page. Minimum value: 1 | [optional][default to 1]
43
43
**pageSize** | **number**| Results per page. Allowed values 1-100, default is 25. | [optional][default to 25]
44
44
@@ -112,8 +112,8 @@ Name | Type | Description | Notes
constvideoId='vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to retrieve session information for.
115
-
constperiod='period_example'; // Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15
116
-
constmetadata='metadata[Author]=John Doe&metadata[Format]=Tutorial'; // Metadata and Dynamic Metadata filter. Send an array of key value pairs you want to filter sessios with.
115
+
constperiod='period_example'; // Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15
116
+
constmetadata='metadata[Author]=John Doe&metadata[Format]=Tutorial'; // Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with.
117
117
constcurrentPage='2'; // Choose the number of search results to return per page. Minimum value: 1
118
118
constpageSize='30'; // Results per page. Allowed values 1-100, default is 25.
119
119
@@ -131,8 +131,8 @@ Name | Type | Description | Notes
**videoId** | **string**| The unique identifier for the video you want to retrieve session information for. | [default to undefined]
134
-
**period** | **string**| Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 | [optional][default to undefined]
135
-
**metadata** | **{ [key: string]: string; }**| Metadata and Dynamic Metadata filter. Send an array of key value pairs you want to filter sessios with. | [optional]
134
+
**period** | **string**| Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 | [optional][default to undefined]
135
+
**metadata** | **{ [key: string]: string; }**| Metadata and [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) filter. Send an array of key value pairs you want to filter sessios with. | [optional]
136
136
**currentPage** | **number**| Choose the number of search results to return per page. Minimum value: 1 | [optional][default to 1]
137
137
**pageSize** | **number**| Results per page. Allowed values 1-100, default is 25. | [optional][default to 25]
ttl:56, // Time in seconds that the token will be active. A value of 0 means that the token has no expiration date. The default is to have no expiration.
152
+
ttl:56, // Time in seconds that the token will be active. A value of 0 means that the token has no exipration date. The default is to have no expiration.
Copy file name to clipboardExpand all lines: doc/api/VideosApi.md
+69-15Lines changed: 69 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,7 @@ Name | Type | Description | Notes
151
151
152
152
consttitle='My Video.mp4'; // The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles.
153
153
consttags='["captions", "dialogue"]'; // A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned.
154
-
constmetadata='metadata[Author]=John Doe&metadata[Format]=Tutorial'; // Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter.
154
+
constmetadata='metadata[Author]=John Doe&metadata[Format]=Tutorial'; // Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair.
155
155
constdescription='New Zealand'; // If you described a video with a term or sentence, you can add it here to return videos containing this string.
156
156
constliveStreamId='li400mYKSgQ6xs7taUeSaEKr'; // If you know the ID for a live stream, you can retrieve the stream by adding the ID for it here.
157
157
constsortBy='publishedAt'; // Allowed: publishedAt, title. You can search by the time videos were published at, or by title.
@@ -174,7 +174,7 @@ Name | Type | Description | Notes
**title** | **string**| The title of a specific video you want to find. The search will match exactly to what term you provide and return any videos that contain the same term as part of their titles. | [optional][default to undefined]
176
176
**tags** | **Array<string>**| A tag is a category you create and apply to videos. You can search for videos with particular tags by listing one or more here. Only videos that have all the tags you list will be returned. | [optional]
177
-
**metadata** | **{ [key: string]: string; }**| Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. | [optional]
177
+
**metadata** | **{ [key: string]: string; }**| Videos can be tagged with metadata tags in key:value pairs. You can search for videos with specific key value pairs using this parameter. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair. | [optional]
178
178
**description** | **string**| If you described a video with a term or sentence, you can add it here to return videos containing this string. | [optional][default to undefined]
179
179
**liveStreamId** | **string**| If you know the ID for a live stream, you can retrieve the stream by adding the ID for it here. | [optional][default to undefined]
180
180
**sortBy** | **string**| Allowed: publishedAt, title. You can search by the time videos were published at, or by title. | [optional][default to undefined]
@@ -211,11 +211,11 @@ Name | Type | Description | Notes
211
211
playerId:"pl4k0jvEUuaTdRAEjQ4Jfrgz", // The unique ID for the player you want to associate with your video.
212
212
title:"title_example", // The title you want to use for your video.
213
213
description:"A film about good books.", // A brief description of the video.
214
-
_public:true, // Whether the video is publicly available or not. False means it is set to private.
214
+
_public:true, // Whether the video is publicly available or not. False means it is set to private. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos).
215
215
panoramic:false, // Whether the video is a 360 degree or immersive video.
216
216
mp4Support:true, // Whether the player supports the mp4 format.
217
217
tags: ["maths", "string theory", "video"], // A list of terms or words you want to tag the video with. Make sure the list includes all the tags you want as whatever you send in this list will overwrite the existing list for the video.
218
-
metadata:null, // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video.
218
+
metadata:null, // A list (array) of dictionaries where each dictionary contains a key value pair that describes the video. As with tags, you must send the complete list of metadata you want as whatever you send here will overwrite the existing metadata for the video. [Dynamic Metadata](https://api.video/blog/endpoints/dynamic-metadata) allows you to define a key that allows any value pair.
219
219
};
220
220
221
221
// Video
@@ -261,7 +261,7 @@ Name | Type | Description | Notes
261
261
262
262
constvideoId='vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail.
263
263
constvideoThumbnailPickPayload= {
264
-
timecode:"timecode_example", // Frame in video to be used as a placeholder before the video plays. Example: '\"00:01:00.000\" for 1 minute into the video.' Valid Patterns: \"hh:mm:ss.ms\" \"hh:mm:ss:frameNumber\" \"124\" (integer value is reported as seconds) If selection is out of range, \"00:00:00.00\" will be chosen.
264
+
timecode:"timecode_example", // Frame in video to be used as a placeholder before the video plays. Example: '\"00:01:00.000\" for 1 minute into the video.' Valid Patterns: \"hh:mm:ss.ms\" \"hh:mm:ss:frameNumber\" \"124\" (integer value is reported as seconds) If selection is out of range, \"00:00:00.00\" will be chosen.
265
265
};
266
266
267
267
// Video
@@ -326,11 +326,37 @@ Name | Type | Description | Notes
326
326
327
327
### Upload chunks
328
328
329
-
Large files are broken into chunks for upload. You can control the size of the chunks using the `setUploadChunkSize()` of method of `ApiVideoClient` before uploading:
329
+
Large files are broken into chunks for upload. You can control the size of the chunks using the `chunkSize` parameter when you instanciate the ApiVideoClient:
330
330
331
-
```java
332
-
apiVideoClient.setUploadChunkSize(50*1024*1024); // use 50MB chunks
Progressive uploads make it possible to upload a video source "progressively," i.e., before knowing the total size of the video. This is done by sending chunks of the video source file sequentially.
341
+
The last chunk is sent by calling a different method, so api.video knows that it is time to reassemble the different chunks that were received.
342
+
343
+
```js
344
+
(async () => {
345
+
try {
346
+
constclient=newApiVideoClient();
347
+
consttoken='to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want to use to upload a video.
title:"Maths video", // The title of your new video.
362
388
description:"A video about string theory.", // A brief description of your video.
363
389
source:"https://www.myvideo.url.com/video.mp4", // If you add a video already on the web, this is where you enter the url for the video.
364
-
_public:true, // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view.
390
+
_public:true, // Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. Default is true. Tutorials on [private videos](https://api.video/blog/endpoints/private-videos).
365
391
panoramic:false, // Indicates if your video is a 360/immersive video.
366
392
mp4Support:true, // Enables mp4 version in addition to streamed version.
367
393
playerId:"pl45KFKdlddgk654dspkze", // The unique identification number for your video player.
368
394
tags: ["maths", "string theory", "video"], // A list of tags you want to use to describe your video.
369
-
metadata: [{"key":"Author", "value":"John Doe"}], // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. You can also just use the pairs as another way to tag and categorize your videos.
395
+
metadata: [{"key":"Author", "value":"John Doe"}], // A list of key value pairs that you use to provide metadata for your video. These pairs can be made dynamic, allowing you to segment your audience. Read more on [dynamic metadata](https://api.video/blog/endpoints/dynamic-metadata).
370
396
};
371
397
372
398
// Video
@@ -431,11 +457,39 @@ Name | Type | Description | Notes
431
457
432
458
### Upload chunks
433
459
434
-
Large files are broken into chunks for upload. You can control the size of the chunks using the `setUploadChunkSize()` of method of `ApiVideoClient` before uploading:
460
+
Large files are broken into chunks for upload. You can control the size of the chunks using the `chunkSize` parameter when you instanciate the ApiVideoClient:
461
+
462
+
```js
463
+
constclient=newApiVideoClient({
464
+
apiKey:"YOUR_API_TOKEN",
465
+
chunkSize:50*1024*1024, // 50mb chunks
466
+
});
467
+
```
468
+
469
+
### Progressive uploads
470
+
471
+
Progressive uploads make it possible to upload a video source "progressively," i.e., before knowing the total size of the video. This is done by sending chunks of the video source file sequentially.
472
+
The last chunk is sent by calling a different method, so api.video knows that it is time to reassemble the different chunks that were received.
**ttl** | **number** | Time in seconds that the token will be active. A value of 0 means that the token has no expiration date. The default is to have no expiration. | [optional]
8
+
**ttl** | **number** | Time in seconds that the token will be active. A value of 0 means that the token has no exipration date. The default is to have no expiration. | [optional]
0 commit comments