@appwrite.io/console 18.4.0-rc.2 → 18.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,860 +0,0 @@
1
- import { Client } from '../client';
2
- import type { Models } from '../models';
3
- import { VideoOutput } from '../enums/video-output';
4
- import { ImageFormat } from '../enums/image-format';
5
- import { VideoRenditionStatus } from '../enums/video-rendition-status';
6
- export declare class Videos {
7
- client: Client;
8
- constructor(client: Client);
9
- /**
10
- * Get a list of all the videos in the current project.
11
- *
12
- *
13
- * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: bucketId, fileId, name, size, status, format, duration, width, height, videoCodec, videoBitRate, audioCodec, audioBitRate
14
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
15
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
16
- * @throws {AppwriteException}
17
- * @returns {Promise<Models.VideoList>}
18
- */
19
- list(params?: {
20
- queries?: string[];
21
- search?: string;
22
- total?: boolean;
23
- }): Promise<Models.VideoList>;
24
- /**
25
- * Get a list of all the videos in the current project.
26
- *
27
- *
28
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: bucketId, fileId, name, size, status, format, duration, width, height, videoCodec, videoBitRate, audioCodec, audioBitRate
29
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
30
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
31
- * @throws {AppwriteException}
32
- * @returns {Promise<Models.VideoList>}
33
- * @deprecated Use the object parameter style method for a better developer experience.
34
- */
35
- list(queries?: string[], search?: string, total?: boolean): Promise<Models.VideoList>;
36
- /**
37
- * Create a video resource from an existing file in a storage bucket. The source file must be a video or audio file. Creating a video only stores the document in `pending` status; it does not start a download. Call the create-source endpoint next, then poll until `status` is `ready` before creating a timeline or rendition.
38
- *
39
- * An optional `name` defaults to the source file name. Uploaded subtitle files override auto-extracted tracks for the same language once extraction has run as part of create-source.
40
- *
41
- *
42
- * @param {string} params.bucketId - Storage bucket unique ID holding the source file.
43
- * @param {string} params.fileId - Source file unique ID.
44
- * @param {string} params.name - Video name. Defaults to the source file name. Max length: 128 chars.
45
- * @throws {AppwriteException}
46
- * @returns {Promise<Models.Video>}
47
- */
48
- create(params: {
49
- bucketId: string;
50
- fileId: string;
51
- name?: string;
52
- }): Promise<Models.Video>;
53
- /**
54
- * Create a video resource from an existing file in a storage bucket. The source file must be a video or audio file. Creating a video only stores the document in `pending` status; it does not start a download. Call the create-source endpoint next, then poll until `status` is `ready` before creating a timeline or rendition.
55
- *
56
- * An optional `name` defaults to the source file name. Uploaded subtitle files override auto-extracted tracks for the same language once extraction has run as part of create-source.
57
- *
58
- *
59
- * @param {string} bucketId - Storage bucket unique ID holding the source file.
60
- * @param {string} fileId - Source file unique ID.
61
- * @param {string} name - Video name. Defaults to the source file name. Max length: 128 chars.
62
- * @throws {AppwriteException}
63
- * @returns {Promise<Models.Video>}
64
- * @deprecated Use the object parameter style method for a better developer experience.
65
- */
66
- create(bucketId: string, fileId: string, name?: string): Promise<Models.Video>;
67
- /**
68
- * Get a list of all the video profiles in the current project.
69
- *
70
- *
71
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
72
- * @throws {AppwriteException}
73
- * @returns {Promise<Models.VideoProfileList>}
74
- */
75
- listProfiles(params?: {
76
- search?: string;
77
- }): Promise<Models.VideoProfileList>;
78
- /**
79
- * Get a list of all the video profiles in the current project.
80
- *
81
- *
82
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
83
- * @throws {AppwriteException}
84
- * @returns {Promise<Models.VideoProfileList>}
85
- * @deprecated Use the object parameter style method for a better developer experience.
86
- */
87
- listProfiles(search?: string): Promise<Models.VideoProfileList>;
88
- /**
89
- * Create a video profile describing an encoding target: output dimensions and video/audio bitrates. Renditions are encoded against a profile.
90
- *
91
- *
92
- * @param {string} params.name - Video profile name.
93
- * @param {number} params.videoBitRate - Target video bitrate in kilobits per second.
94
- * @param {number} params.audioBitRate - Target audio bitrate in kilobits per second.
95
- * @param {number} params.width - Target video width in pixels.
96
- * @param {number} params.height - Target video height in pixels.
97
- * @throws {AppwriteException}
98
- * @returns {Promise<Models.VideoProfile>}
99
- */
100
- createProfile(params: {
101
- name: string;
102
- videoBitRate: number;
103
- audioBitRate: number;
104
- width: number;
105
- height: number;
106
- }): Promise<Models.VideoProfile>;
107
- /**
108
- * Create a video profile describing an encoding target: output dimensions and video/audio bitrates. Renditions are encoded against a profile.
109
- *
110
- *
111
- * @param {string} name - Video profile name.
112
- * @param {number} videoBitRate - Target video bitrate in kilobits per second.
113
- * @param {number} audioBitRate - Target audio bitrate in kilobits per second.
114
- * @param {number} width - Target video width in pixels.
115
- * @param {number} height - Target video height in pixels.
116
- * @throws {AppwriteException}
117
- * @returns {Promise<Models.VideoProfile>}
118
- * @deprecated Use the object parameter style method for a better developer experience.
119
- */
120
- createProfile(name: string, videoBitRate: number, audioBitRate: number, width: number, height: number): Promise<Models.VideoProfile>;
121
- /**
122
- * Get a video profile by its unique ID.
123
- *
124
- *
125
- * @param {string} params.profileId - Video profile unique ID.
126
- * @throws {AppwriteException}
127
- * @returns {Promise<Models.VideoProfile>}
128
- */
129
- getProfile(params: {
130
- profileId: string;
131
- }): Promise<Models.VideoProfile>;
132
- /**
133
- * Get a video profile by its unique ID.
134
- *
135
- *
136
- * @param {string} profileId - Video profile unique ID.
137
- * @throws {AppwriteException}
138
- * @returns {Promise<Models.VideoProfile>}
139
- * @deprecated Use the object parameter style method for a better developer experience.
140
- */
141
- getProfile(profileId: string): Promise<Models.VideoProfile>;
142
- /**
143
- * Update a video profile by its unique ID. Existing renditions are not re-encoded.
144
- *
145
- *
146
- * @param {string} params.profileId - Video profile unique ID.
147
- * @param {string} params.name - Video profile name.
148
- * @param {number} params.videoBitRate - Target video bitrate in kilobits per second.
149
- * @param {number} params.audioBitRate - Target audio bitrate in kilobits per second.
150
- * @param {number} params.width - Target video width in pixels.
151
- * @param {number} params.height - Target video height in pixels.
152
- * @throws {AppwriteException}
153
- * @returns {Promise<Models.VideoProfile>}
154
- */
155
- updateProfile(params: {
156
- profileId: string;
157
- name: string;
158
- videoBitRate: number;
159
- audioBitRate: number;
160
- width: number;
161
- height: number;
162
- }): Promise<Models.VideoProfile>;
163
- /**
164
- * Update a video profile by its unique ID. Existing renditions are not re-encoded.
165
- *
166
- *
167
- * @param {string} profileId - Video profile unique ID.
168
- * @param {string} name - Video profile name.
169
- * @param {number} videoBitRate - Target video bitrate in kilobits per second.
170
- * @param {number} audioBitRate - Target audio bitrate in kilobits per second.
171
- * @param {number} width - Target video width in pixels.
172
- * @param {number} height - Target video height in pixels.
173
- * @throws {AppwriteException}
174
- * @returns {Promise<Models.VideoProfile>}
175
- * @deprecated Use the object parameter style method for a better developer experience.
176
- */
177
- updateProfile(profileId: string, name: string, videoBitRate: number, audioBitRate: number, width: number, height: number): Promise<Models.VideoProfile>;
178
- /**
179
- * Delete a video profile by its unique ID. Renditions already encoded against it are left in place.
180
- *
181
- *
182
- * @param {string} params.profileId - Video profile unique ID.
183
- * @throws {AppwriteException}
184
- * @returns {Promise<{}>}
185
- */
186
- deleteProfile(params: {
187
- profileId: string;
188
- }): Promise<{}>;
189
- /**
190
- * Delete a video profile by its unique ID. Renditions already encoded against it are left in place.
191
- *
192
- *
193
- * @param {string} profileId - Video profile unique ID.
194
- * @throws {AppwriteException}
195
- * @returns {Promise<{}>}
196
- * @deprecated Use the object parameter style method for a better developer experience.
197
- */
198
- deleteProfile(profileId: string): Promise<{}>;
199
- /**
200
- * Get a video by its unique ID. This endpoint response returns a JSON object with the video metadata.
201
- *
202
- *
203
- * @param {string} params.videoId - Video unique ID.
204
- * @throws {AppwriteException}
205
- * @returns {Promise<Models.Video>}
206
- */
207
- get(params: {
208
- videoId: string;
209
- }): Promise<Models.Video>;
210
- /**
211
- * Get a video by its unique ID. This endpoint response returns a JSON object with the video metadata.
212
- *
213
- *
214
- * @param {string} videoId - Video unique ID.
215
- * @throws {AppwriteException}
216
- * @returns {Promise<Models.Video>}
217
- * @deprecated Use the object parameter style method for a better developer experience.
218
- */
219
- get(videoId: string): Promise<Models.Video>;
220
- /**
221
- * Update a video's name. The source file cannot be replaced; delete the video and create a new one to point at a different file.
222
- *
223
- *
224
- * @param {string} params.videoId - Video unique ID.
225
- * @param {string} params.name - Video name. Max length: 128 chars.
226
- * @throws {AppwriteException}
227
- * @returns {Promise<Models.Video>}
228
- */
229
- update(params: {
230
- videoId: string;
231
- name: string;
232
- }): Promise<Models.Video>;
233
- /**
234
- * Update a video's name. The source file cannot be replaced; delete the video and create a new one to point at a different file.
235
- *
236
- *
237
- * @param {string} videoId - Video unique ID.
238
- * @param {string} name - Video name. Max length: 128 chars.
239
- * @throws {AppwriteException}
240
- * @returns {Promise<Models.Video>}
241
- * @deprecated Use the object parameter style method for a better developer experience.
242
- */
243
- update(videoId: string, name: string): Promise<Models.Video>;
244
- /**
245
- * Delete a video by its unique ID. This also removes every rendition, subtitle, preview and transcoded artifact derived from it.
246
- *
247
- *
248
- * @param {string} params.videoId - Video unique ID.
249
- * @throws {AppwriteException}
250
- * @returns {Promise<{}>}
251
- */
252
- delete(params: {
253
- videoId: string;
254
- }): Promise<{}>;
255
- /**
256
- * Delete a video by its unique ID. This also removes every rendition, subtitle, preview and transcoded artifact derived from it.
257
- *
258
- *
259
- * @param {string} videoId - Video unique ID.
260
- * @throws {AppwriteException}
261
- * @returns {Promise<{}>}
262
- * @deprecated Use the object parameter style method for a better developer experience.
263
- */
264
- delete(videoId: string): Promise<{}>;
265
- /**
266
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
267
- *
268
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
269
- *
270
- *
271
- * @param {string} params.videoId - Video unique ID.
272
- * @throws {AppwriteException}
273
- * @returns {string}
274
- */
275
- getCmafHlsManifest(params: {
276
- videoId: string;
277
- }): string;
278
- /**
279
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
280
- *
281
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
282
- *
283
- *
284
- * @param {string} videoId - Video unique ID.
285
- * @throws {AppwriteException}
286
- * @returns {string}
287
- * @deprecated Use the object parameter style method for a better developer experience.
288
- */
289
- getCmafHlsManifest(videoId: string): string;
290
- /**
291
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
292
- *
293
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
294
- *
295
- *
296
- * @param {string} params.videoId - Video unique ID.
297
- * @throws {AppwriteException}
298
- * @returns {string}
299
- */
300
- getCmafDashManifest(params: {
301
- videoId: string;
302
- }): string;
303
- /**
304
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
305
- *
306
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
307
- *
308
- *
309
- * @param {string} videoId - Video unique ID.
310
- * @throws {AppwriteException}
311
- * @returns {string}
312
- * @deprecated Use the object parameter style method for a better developer experience.
313
- */
314
- getCmafDashManifest(videoId: string): string;
315
- /**
316
- * Get the HLS (or CMAF-HLS) media playlist for a single stream of a rendition. Players reach this from the master playlist; it is not usually requested directly.
317
- *
318
- * CMAF stream playlists live under `/outputs/cmaf/renditions/:renditionId/streams/:streamId/playlist.m3u8` and include `#EXT-X-MAP` for the fMP4 initialisation segment.
319
- *
320
- *
321
- * @param {string} params.videoId - Video unique ID.
322
- * @param {string} params.renditionId - Rendition unique ID.
323
- * @param {number} params.streamId - Stream index within the rendition.
324
- * @throws {AppwriteException}
325
- * @returns {string}
326
- */
327
- getCmafStreamManifest(params: {
328
- videoId: string;
329
- renditionId: string;
330
- streamId: number;
331
- }): string;
332
- /**
333
- * Get the HLS (or CMAF-HLS) media playlist for a single stream of a rendition. Players reach this from the master playlist; it is not usually requested directly.
334
- *
335
- * CMAF stream playlists live under `/outputs/cmaf/renditions/:renditionId/streams/:streamId/playlist.m3u8` and include `#EXT-X-MAP` for the fMP4 initialisation segment.
336
- *
337
- *
338
- * @param {string} videoId - Video unique ID.
339
- * @param {string} renditionId - Rendition unique ID.
340
- * @param {number} streamId - Stream index within the rendition.
341
- * @throws {AppwriteException}
342
- * @returns {string}
343
- * @deprecated Use the object parameter style method for a better developer experience.
344
- */
345
- getCmafStreamManifest(videoId: string, renditionId: string, streamId: number): string;
346
- /**
347
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
348
- *
349
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
350
- *
351
- *
352
- * @param {string} params.videoId - Video unique ID.
353
- * @throws {AppwriteException}
354
- * @returns {string}
355
- */
356
- getDashManifest(params: {
357
- videoId: string;
358
- }): string;
359
- /**
360
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
361
- *
362
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
363
- *
364
- *
365
- * @param {string} videoId - Video unique ID.
366
- * @throws {AppwriteException}
367
- * @returns {string}
368
- * @deprecated Use the object parameter style method for a better developer experience.
369
- */
370
- getDashManifest(videoId: string): string;
371
- /**
372
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
373
- *
374
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
375
- *
376
- *
377
- * @param {string} params.videoId - Video unique ID.
378
- * @throws {AppwriteException}
379
- * @returns {string}
380
- */
381
- getHlsManifest(params: {
382
- videoId: string;
383
- }): string;
384
- /**
385
- * Get the top-level streaming manifest for a video output: an HLS master playlist (`master.m3u8`) or a DASH MPD (`master.mpd`). Hand this URL to a player to begin adaptive playback.
386
- *
387
- * For `output=cmaf`, both masters are available under `/outputs/cmaf/` and point at the same fMP4 segment set.
388
- *
389
- *
390
- * @param {string} videoId - Video unique ID.
391
- * @throws {AppwriteException}
392
- * @returns {string}
393
- * @deprecated Use the object parameter style method for a better developer experience.
394
- */
395
- getHlsManifest(videoId: string): string;
396
- /**
397
- * Get the HLS (or CMAF-HLS) media playlist for a single stream of a rendition. Players reach this from the master playlist; it is not usually requested directly.
398
- *
399
- * CMAF stream playlists live under `/outputs/cmaf/renditions/:renditionId/streams/:streamId/playlist.m3u8` and include `#EXT-X-MAP` for the fMP4 initialisation segment.
400
- *
401
- *
402
- * @param {string} params.videoId - Video unique ID.
403
- * @param {string} params.renditionId - Rendition unique ID.
404
- * @param {number} params.streamId - Stream index within the rendition.
405
- * @throws {AppwriteException}
406
- * @returns {string}
407
- */
408
- getStreamManifest(params: {
409
- videoId: string;
410
- renditionId: string;
411
- streamId: number;
412
- }): string;
413
- /**
414
- * Get the HLS (or CMAF-HLS) media playlist for a single stream of a rendition. Players reach this from the master playlist; it is not usually requested directly.
415
- *
416
- * CMAF stream playlists live under `/outputs/cmaf/renditions/:renditionId/streams/:streamId/playlist.m3u8` and include `#EXT-X-MAP` for the fMP4 initialisation segment.
417
- *
418
- *
419
- * @param {string} videoId - Video unique ID.
420
- * @param {string} renditionId - Rendition unique ID.
421
- * @param {number} streamId - Stream index within the rendition.
422
- * @throws {AppwriteException}
423
- * @returns {string}
424
- * @deprecated Use the object parameter style method for a better developer experience.
425
- */
426
- getStreamManifest(videoId: string, renditionId: string, streamId: number): string;
427
- /**
428
- * Get a single media segment of a rendition. Players reach this from a media playlist or MPD; it is not usually requested directly.
429
- *
430
- * HLS MPEG-TS segments use `video/mp2t`. DASH and CMAF fMP4 segments use `video/iso.segment`.
431
- *
432
- *
433
- * @param {string} params.videoId - Video unique ID.
434
- * @param {VideoOutput} params.output - Streaming output format.
435
- * @param {string} params.renditionId - Rendition unique ID.
436
- * @param {string} params.segmentId - Segment unique ID.
437
- * @throws {AppwriteException}
438
- * @returns {string}
439
- */
440
- getSegment(params: {
441
- videoId: string;
442
- output: VideoOutput;
443
- renditionId: string;
444
- segmentId: string;
445
- }): string;
446
- /**
447
- * Get a single media segment of a rendition. Players reach this from a media playlist or MPD; it is not usually requested directly.
448
- *
449
- * HLS MPEG-TS segments use `video/mp2t`. DASH and CMAF fMP4 segments use `video/iso.segment`.
450
- *
451
- *
452
- * @param {string} videoId - Video unique ID.
453
- * @param {VideoOutput} output - Streaming output format.
454
- * @param {string} renditionId - Rendition unique ID.
455
- * @param {string} segmentId - Segment unique ID.
456
- * @throws {AppwriteException}
457
- * @returns {string}
458
- * @deprecated Use the object parameter style method for a better developer experience.
459
- */
460
- getSegment(videoId: string, output: VideoOutput, renditionId: string, segmentId: string): string;
461
- /**
462
- * Get the playable subtitle resource for a video output: an HLS subtitle playlist, or the WebVTT file itself for DASH.
463
- *
464
- *
465
- * @param {string} params.videoId - Video unique ID.
466
- * @param {VideoOutput} params.output - Streaming output format.
467
- * @param {string} params.subtitleId - Subtitle unique ID.
468
- * @throws {AppwriteException}
469
- * @returns {string}
470
- */
471
- getSubtitleManifest(params: {
472
- videoId: string;
473
- output: VideoOutput;
474
- subtitleId: string;
475
- }): string;
476
- /**
477
- * Get the playable subtitle resource for a video output: an HLS subtitle playlist, or the WebVTT file itself for DASH.
478
- *
479
- *
480
- * @param {string} videoId - Video unique ID.
481
- * @param {VideoOutput} output - Streaming output format.
482
- * @param {string} subtitleId - Subtitle unique ID.
483
- * @throws {AppwriteException}
484
- * @returns {string}
485
- * @deprecated Use the object parameter style method for a better developer experience.
486
- */
487
- getSubtitleManifest(videoId: string, output: VideoOutput, subtitleId: string): string;
488
- /**
489
- * Get a single WebVTT segment of a subtitle track. Players reach this from a subtitle playlist; it is not usually requested directly.
490
- *
491
- *
492
- * @param {string} params.videoId - Video unique ID.
493
- * @param {VideoOutput} params.output - Streaming output format.
494
- * @param {string} params.subtitleId - Subtitle unique ID.
495
- * @param {string} params.segmentId - Segment unique ID.
496
- * @throws {AppwriteException}
497
- * @returns {string}
498
- */
499
- getSubtitleSegment(params: {
500
- videoId: string;
501
- output: VideoOutput;
502
- subtitleId: string;
503
- segmentId: string;
504
- }): string;
505
- /**
506
- * Get a single WebVTT segment of a subtitle track. Players reach this from a subtitle playlist; it is not usually requested directly.
507
- *
508
- *
509
- * @param {string} videoId - Video unique ID.
510
- * @param {VideoOutput} output - Streaming output format.
511
- * @param {string} subtitleId - Subtitle unique ID.
512
- * @param {string} segmentId - Segment unique ID.
513
- * @throws {AppwriteException}
514
- * @returns {string}
515
- * @deprecated Use the object parameter style method for a better developer experience.
516
- */
517
- getSubtitleSegment(videoId: string, output: VideoOutput, subtitleId: string, segmentId: string): string;
518
- /**
519
- * Get a single sprite sheet from a video's timeline as an image. You can crop the returned image and choose its output format.
520
- *
521
- *
522
- * @param {string} params.videoId - Video unique ID.
523
- * @param {string} params.previewId - Preview unique ID.
524
- * @param {number} params.width - Resize preview image width, in pixels.
525
- * @param {number} params.height - Resize preview image height, in pixels.
526
- * @param {ImageFormat} params.output - Output format type (jpeg, jpg, png, gif and webp).
527
- * @throws {AppwriteException}
528
- * @returns {string}
529
- */
530
- getPreview(params: {
531
- videoId: string;
532
- previewId: string;
533
- width?: number;
534
- height?: number;
535
- output?: ImageFormat;
536
- }): string;
537
- /**
538
- * Get a single sprite sheet from a video's timeline as an image. You can crop the returned image and choose its output format.
539
- *
540
- *
541
- * @param {string} videoId - Video unique ID.
542
- * @param {string} previewId - Preview unique ID.
543
- * @param {number} width - Resize preview image width, in pixels.
544
- * @param {number} height - Resize preview image height, in pixels.
545
- * @param {ImageFormat} output - Output format type (jpeg, jpg, png, gif and webp).
546
- * @throws {AppwriteException}
547
- * @returns {string}
548
- * @deprecated Use the object parameter style method for a better developer experience.
549
- */
550
- getPreview(videoId: string, previewId: string, width?: number, height?: number, output?: ImageFormat): string;
551
- /**
552
- * Get a list of all the renditions of a video.
553
- *
554
- *
555
- * @param {string} params.videoId - Video unique ID.
556
- * @param {VideoOutput} params.output - Only return renditions packaged for this output format.
557
- * @param {VideoRenditionStatus} params.status - Only return renditions in this transcoding state.
558
- * @throws {AppwriteException}
559
- * @returns {Promise<Models.VideoRenditionList>}
560
- */
561
- listRenditions(params: {
562
- videoId: string;
563
- output?: VideoOutput;
564
- status?: VideoRenditionStatus;
565
- }): Promise<Models.VideoRenditionList>;
566
- /**
567
- * Get a list of all the renditions of a video.
568
- *
569
- *
570
- * @param {string} videoId - Video unique ID.
571
- * @param {VideoOutput} output - Only return renditions packaged for this output format.
572
- * @param {VideoRenditionStatus} status - Only return renditions in this transcoding state.
573
- * @throws {AppwriteException}
574
- * @returns {Promise<Models.VideoRenditionList>}
575
- * @deprecated Use the object parameter style method for a better developer experience.
576
- */
577
- listRenditions(videoId: string, output?: VideoOutput, status?: VideoRenditionStatus): Promise<Models.VideoRenditionList>;
578
- /**
579
- * Request a new rendition of a video, encoded against a video profile and packaged for HLS, DASH, or CMAF. The rendition is created immediately with a `pending` status and transcoded in the background; poll it or subscribe to realtime events to follow its progress.
580
- *
581
- * The working copy must already be `ready`. Call the create-source endpoint first and wait until the video status is `ready`. If the working copy has been released (`removed`), this request fails with `video_source_removed`. Until the source is ready, this request fails with `video_not_ready`.
582
- *
583
- * Each video may have only one rendition per profile and output combination. Creating a duplicate fails with `video_rendition_already_exists`. After an encode fails or is aborted, delete the rendition and create it again. The same profile may still be encoded for different outputs (for example HLS and DASH).
584
- *
585
- * CMAF packs shared fMP4 segments once and exposes both HLS (`/outputs/cmaf/master.m3u8`) and DASH (`/outputs/cmaf/master.mpd`) masters for the same encode.
586
- *
587
- *
588
- * @param {string} params.videoId - Video unique ID.
589
- * @param {string} params.profileId - Video profile unique ID to encode against.
590
- * @param {VideoOutput} params.output - Streaming output format to package as.
591
- * @throws {AppwriteException}
592
- * @returns {Promise<Models.VideoRendition>}
593
- */
594
- createRendition(params: {
595
- videoId: string;
596
- profileId: string;
597
- output: VideoOutput;
598
- }): Promise<Models.VideoRendition>;
599
- /**
600
- * Request a new rendition of a video, encoded against a video profile and packaged for HLS, DASH, or CMAF. The rendition is created immediately with a `pending` status and transcoded in the background; poll it or subscribe to realtime events to follow its progress.
601
- *
602
- * The working copy must already be `ready`. Call the create-source endpoint first and wait until the video status is `ready`. If the working copy has been released (`removed`), this request fails with `video_source_removed`. Until the source is ready, this request fails with `video_not_ready`.
603
- *
604
- * Each video may have only one rendition per profile and output combination. Creating a duplicate fails with `video_rendition_already_exists`. After an encode fails or is aborted, delete the rendition and create it again. The same profile may still be encoded for different outputs (for example HLS and DASH).
605
- *
606
- * CMAF packs shared fMP4 segments once and exposes both HLS (`/outputs/cmaf/master.m3u8`) and DASH (`/outputs/cmaf/master.mpd`) masters for the same encode.
607
- *
608
- *
609
- * @param {string} videoId - Video unique ID.
610
- * @param {string} profileId - Video profile unique ID to encode against.
611
- * @param {VideoOutput} output - Streaming output format to package as.
612
- * @throws {AppwriteException}
613
- * @returns {Promise<Models.VideoRendition>}
614
- * @deprecated Use the object parameter style method for a better developer experience.
615
- */
616
- createRendition(videoId: string, profileId: string, output: VideoOutput): Promise<Models.VideoRendition>;
617
- /**
618
- * Get a rendition by its unique ID, including its current transcoding status and progress.
619
- *
620
- *
621
- * @param {string} params.videoId - Video unique ID.
622
- * @param {string} params.renditionId - Rendition unique ID.
623
- * @throws {AppwriteException}
624
- * @returns {Promise<Models.VideoRendition>}
625
- */
626
- getRendition(params: {
627
- videoId: string;
628
- renditionId: string;
629
- }): Promise<Models.VideoRendition>;
630
- /**
631
- * Get a rendition by its unique ID, including its current transcoding status and progress.
632
- *
633
- *
634
- * @param {string} videoId - Video unique ID.
635
- * @param {string} renditionId - Rendition unique ID.
636
- * @throws {AppwriteException}
637
- * @returns {Promise<Models.VideoRendition>}
638
- * @deprecated Use the object parameter style method for a better developer experience.
639
- */
640
- getRendition(videoId: string, renditionId: string): Promise<Models.VideoRendition>;
641
- /**
642
- * Delete a rendition by its unique ID, along with its packaged segments and transcoded output.
643
- *
644
- *
645
- * @param {string} params.videoId - Video unique ID.
646
- * @param {string} params.renditionId - Rendition unique ID.
647
- * @throws {AppwriteException}
648
- * @returns {Promise<{}>}
649
- */
650
- deleteRendition(params: {
651
- videoId: string;
652
- renditionId: string;
653
- }): Promise<{}>;
654
- /**
655
- * Delete a rendition by its unique ID, along with its packaged segments and transcoded output.
656
- *
657
- *
658
- * @param {string} videoId - Video unique ID.
659
- * @param {string} renditionId - Rendition unique ID.
660
- * @throws {AppwriteException}
661
- * @returns {Promise<{}>}
662
- * @deprecated Use the object parameter style method for a better developer experience.
663
- */
664
- deleteRendition(videoId: string, renditionId: string): Promise<{}>;
665
- /**
666
- * Materialise the working copy of a video's source file onto the transcode volume. The video is created in `pending` status; this endpoint enqueues the download, probe, and embedded-subtitle extraction. Poll the video until `status` is `ready` before creating a timeline or rendition.
667
- *
668
- * If the working copy is already downloading the request fails with a 409 `video_source_in_progress` error, and if it is already ready with a 409 `video_source_already_exists` error. After the last in-flight rendition finishes the working copy is released and `status` becomes `removed`; call this endpoint again before creating further timelines or renditions.
669
- *
670
- *
671
- * @param {string} params.videoId - Video unique ID.
672
- * @throws {AppwriteException}
673
- * @returns {Promise<Models.Video>}
674
- */
675
- createSource(params: {
676
- videoId: string;
677
- }): Promise<Models.Video>;
678
- /**
679
- * Materialise the working copy of a video's source file onto the transcode volume. The video is created in `pending` status; this endpoint enqueues the download, probe, and embedded-subtitle extraction. Poll the video until `status` is `ready` before creating a timeline or rendition.
680
- *
681
- * If the working copy is already downloading the request fails with a 409 `video_source_in_progress` error, and if it is already ready with a 409 `video_source_already_exists` error. After the last in-flight rendition finishes the working copy is released and `status` becomes `removed`; call this endpoint again before creating further timelines or renditions.
682
- *
683
- *
684
- * @param {string} videoId - Video unique ID.
685
- * @throws {AppwriteException}
686
- * @returns {Promise<Models.Video>}
687
- * @deprecated Use the object parameter style method for a better developer experience.
688
- */
689
- createSource(videoId: string): Promise<Models.Video>;
690
- /**
691
- * Get a list of all the subtitle tracks attached to a video.
692
- *
693
- *
694
- * @param {string} params.videoId - Video unique ID.
695
- * @throws {AppwriteException}
696
- * @returns {Promise<Models.VideoSubtitleList>}
697
- */
698
- listSubtitles(params: {
699
- videoId: string;
700
- }): Promise<Models.VideoSubtitleList>;
701
- /**
702
- * Get a list of all the subtitle tracks attached to a video.
703
- *
704
- *
705
- * @param {string} videoId - Video unique ID.
706
- * @throws {AppwriteException}
707
- * @returns {Promise<Models.VideoSubtitleList>}
708
- * @deprecated Use the object parameter style method for a better developer experience.
709
- */
710
- listSubtitles(videoId: string): Promise<Models.VideoSubtitleList>;
711
- /**
712
- * Add a subtitle track to a video from a WebVTT or SubRip file in a storage bucket. The file is normalised to WebVTT and segmented in the background.
713
- *
714
- * Uploaded tracks are listed alongside auto-extracted embedded tracks (`embedded: true`). When the current default is an auto-extracted track for the same language code, the upload takes the default flag so players pick the authored file first. Auto-extracted tracks are never removed automatically — delete a track explicitly to remove it. Extraction runs once per video, so a deleted extracted track is not re-created.
715
- *
716
- *
717
- * @param {string} params.videoId - Video unique ID.
718
- * @param {string} params.bucketId - Storage bucket unique ID holding the subtitle file.
719
- * @param {string} params.fileId - Subtitle file unique ID.
720
- * @param {string} params.name - Subtitle display name. Allowed characters: a-z, A-Z, 0-9, space, and - . , ( ) _ '
721
- * @param {string} params.code - Subtitle ISO 639-2 three-letter language code.
722
- * @param {boolean} params.xdefault - Make this the default subtitle track for the video.
723
- * @throws {AppwriteException}
724
- * @returns {Promise<Models.VideoSubtitle>}
725
- */
726
- createSubtitle(params: {
727
- videoId: string;
728
- bucketId: string;
729
- fileId: string;
730
- name: string;
731
- code: string;
732
- xdefault?: boolean;
733
- }): Promise<Models.VideoSubtitle>;
734
- /**
735
- * Add a subtitle track to a video from a WebVTT or SubRip file in a storage bucket. The file is normalised to WebVTT and segmented in the background.
736
- *
737
- * Uploaded tracks are listed alongside auto-extracted embedded tracks (`embedded: true`). When the current default is an auto-extracted track for the same language code, the upload takes the default flag so players pick the authored file first. Auto-extracted tracks are never removed automatically — delete a track explicitly to remove it. Extraction runs once per video, so a deleted extracted track is not re-created.
738
- *
739
- *
740
- * @param {string} videoId - Video unique ID.
741
- * @param {string} bucketId - Storage bucket unique ID holding the subtitle file.
742
- * @param {string} fileId - Subtitle file unique ID.
743
- * @param {string} name - Subtitle display name. Allowed characters: a-z, A-Z, 0-9, space, and - . , ( ) _ '
744
- * @param {string} code - Subtitle ISO 639-2 three-letter language code.
745
- * @param {boolean} xdefault - Make this the default subtitle track for the video.
746
- * @throws {AppwriteException}
747
- * @returns {Promise<Models.VideoSubtitle>}
748
- * @deprecated Use the object parameter style method for a better developer experience.
749
- */
750
- createSubtitle(videoId: string, bucketId: string, fileId: string, name: string, code: string, xdefault?: boolean): Promise<Models.VideoSubtitle>;
751
- /**
752
- * Update a subtitle track by its unique ID. Pass only `name`, `code`, and/or `default` to retag an extracted track (for example `und` → `heb` for Hebrew) without replacing the file. Changing `bucketId`/`fileId` re-packages the track in the background.
753
- *
754
- *
755
- * @param {string} params.videoId - Video unique ID.
756
- * @param {string} params.subtitleId - Subtitle unique ID.
757
- * @param {string} params.bucketId - Storage bucket unique ID holding the subtitle file. Omit together with fileId to only update name, code, or default.
758
- * @param {string} params.fileId - Subtitle file unique ID. Omit together with bucketId to only update name, code, or default.
759
- * @param {string} params.name - Subtitle display name. Allowed characters: a-z, A-Z, 0-9, space, and - . , ( ) _ '
760
- * @param {string} params.code - Subtitle ISO 639-2 three-letter language code (for example `heb` for Hebrew).
761
- * @param {boolean} params.xdefault - Make this the default subtitle track for the video. Omit to leave unchanged.
762
- * @throws {AppwriteException}
763
- * @returns {Promise<Models.VideoSubtitle>}
764
- */
765
- updateSubtitle(params: {
766
- videoId: string;
767
- subtitleId: string;
768
- bucketId?: string;
769
- fileId?: string;
770
- name?: string;
771
- code?: string;
772
- xdefault?: boolean;
773
- }): Promise<Models.VideoSubtitle>;
774
- /**
775
- * Update a subtitle track by its unique ID. Pass only `name`, `code`, and/or `default` to retag an extracted track (for example `und` → `heb` for Hebrew) without replacing the file. Changing `bucketId`/`fileId` re-packages the track in the background.
776
- *
777
- *
778
- * @param {string} videoId - Video unique ID.
779
- * @param {string} subtitleId - Subtitle unique ID.
780
- * @param {string} bucketId - Storage bucket unique ID holding the subtitle file. Omit together with fileId to only update name, code, or default.
781
- * @param {string} fileId - Subtitle file unique ID. Omit together with bucketId to only update name, code, or default.
782
- * @param {string} name - Subtitle display name. Allowed characters: a-z, A-Z, 0-9, space, and - . , ( ) _ '
783
- * @param {string} code - Subtitle ISO 639-2 three-letter language code (for example `heb` for Hebrew).
784
- * @param {boolean} xdefault - Make this the default subtitle track for the video. Omit to leave unchanged.
785
- * @throws {AppwriteException}
786
- * @returns {Promise<Models.VideoSubtitle>}
787
- * @deprecated Use the object parameter style method for a better developer experience.
788
- */
789
- updateSubtitle(videoId: string, subtitleId: string, bucketId?: string, fileId?: string, name?: string, code?: string, xdefault?: boolean): Promise<Models.VideoSubtitle>;
790
- /**
791
- * Delete a subtitle track by its unique ID, along with its packaged segments.
792
- *
793
- *
794
- * @param {string} params.videoId - Video unique ID.
795
- * @param {string} params.subtitleId - Subtitle unique ID.
796
- * @throws {AppwriteException}
797
- * @returns {Promise<{}>}
798
- */
799
- deleteSubtitle(params: {
800
- videoId: string;
801
- subtitleId: string;
802
- }): Promise<{}>;
803
- /**
804
- * Delete a subtitle track by its unique ID, along with its packaged segments.
805
- *
806
- *
807
- * @param {string} videoId - Video unique ID.
808
- * @param {string} subtitleId - Subtitle unique ID.
809
- * @throws {AppwriteException}
810
- * @returns {Promise<{}>}
811
- * @deprecated Use the object parameter style method for a better developer experience.
812
- */
813
- deleteSubtitle(videoId: string, subtitleId: string): Promise<{}>;
814
- /**
815
- * Get the WebVTT sprite timeline for a video, used to render scrubbing thumbnails in a player. Queue generation with the create-timeline endpoint, then poll this endpoint until it returns a WebVTT document.
816
- *
817
- *
818
- * @param {string} params.videoId - Video unique ID.
819
- * @throws {AppwriteException}
820
- * @returns {Promise<string>}
821
- */
822
- getTimeline(params: {
823
- videoId: string;
824
- }): Promise<string>;
825
- /**
826
- * Get the WebVTT sprite timeline for a video, used to render scrubbing thumbnails in a player. Queue generation with the create-timeline endpoint, then poll this endpoint until it returns a WebVTT document.
827
- *
828
- *
829
- * @param {string} videoId - Video unique ID.
830
- * @throws {AppwriteException}
831
- * @returns {Promise<string>}
832
- * @deprecated Use the object parameter style method for a better developer experience.
833
- */
834
- getTimeline(videoId: string): Promise<string>;
835
- /**
836
- * Queue sprite-sheet and WebVTT timeline generation for a video. The working copy must already be `ready`; otherwise the request fails with `video_not_ready` or `video_source_removed`. Audio-only sources have no video track and fail with `video_track_not_found`.
837
- *
838
- * The request is accepted immediately. Poll the get-timeline endpoint until it returns a WebVTT document instead of `video_timeline_not_found`.
839
- *
840
- *
841
- * @param {string} params.videoId - Video unique ID.
842
- * @throws {AppwriteException}
843
- * @returns {Promise<Models.Video>}
844
- */
845
- createTimeline(params: {
846
- videoId: string;
847
- }): Promise<Models.Video>;
848
- /**
849
- * Queue sprite-sheet and WebVTT timeline generation for a video. The working copy must already be `ready`; otherwise the request fails with `video_not_ready` or `video_source_removed`. Audio-only sources have no video track and fail with `video_track_not_found`.
850
- *
851
- * The request is accepted immediately. Poll the get-timeline endpoint until it returns a WebVTT document instead of `video_timeline_not_found`.
852
- *
853
- *
854
- * @param {string} videoId - Video unique ID.
855
- * @throws {AppwriteException}
856
- * @returns {Promise<Models.Video>}
857
- * @deprecated Use the object parameter style method for a better developer experience.
858
- */
859
- createTimeline(videoId: string): Promise<Models.Video>;
860
- }