@fastpix/fastpix-node 1.0.0

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.
package/README.md ADDED
@@ -0,0 +1,509 @@
1
+ # Introduction:
2
+
3
+ The FastPix Node.js SDK, written in typescript, simplifies integration with the FastPix platform. This SDK is designed for secure and efficient communication with the FastPix API, enabling easy management of media uploads, live streaming, and simulcasting. It is intended for use with Node.js (version >= 18).
4
+
5
+ # Key Features:
6
+
7
+ - ## Media API:
8
+
9
+ - **Upload Media**: Upload media files seamlessly from URLs or devices.
10
+ - **Manage Media**: Perform operations such as listing, fetching, updating, and deleting media assets.
11
+ - **Playback IDs**: Generate and manage playback IDs for media access.
12
+
13
+ - ## Live API:
14
+
15
+ - **Create & Manage Live Streams:**: Create, list, update, and delete live streams effortlessly.
16
+ - **Control Stream Access**: Generate playback IDs for live streams to control and manage access.
17
+ - **Simulcast to Multiple Platforms**: Stream content to multiple platforms simultaneously.
18
+
19
+ For detailed usage, refer to the [FastPix API Reference](https://docs.fastpix.io/reference).
20
+
21
+ # Prerequisites:
22
+
23
+ ## Getting started with FastPix:
24
+
25
+ To get started with the **FastPix Node SDK**, ensure you have the following:
26
+
27
+ - The FastPix APIs are authenticated using an **Access Token** and a **Secret Key**. You must generate these credentials to use the SDK.
28
+
29
+ - Follow the steps in the [Authentication with Access Tokens](https://docs.fastpix.io/docs/basic-authentication) guide to obtain your credentials.
30
+
31
+ # Installation:
32
+
33
+ To install the SDK, you can use npm or your favourite node package manager 😉:
34
+
35
+ ```bash
36
+ npm install @fastpix/fastpix-node
37
+ ```
38
+
39
+ # Basic Usage:
40
+
41
+ ## Importing the SDK
42
+
43
+ Depending on your project setup, you can import the SDK using either `import` or `require`.
44
+
45
+ ### Using `import` (ES Modules)
46
+
47
+ If your project supports ES Modules, use the `import` syntax:
48
+
49
+ ```javascript
50
+ import Client from "@fastpix/fastpix-node";
51
+ ```
52
+
53
+ ### Using `require` (CommonJS)
54
+
55
+ If you're using CommonJS modules, you can use `require`:
56
+
57
+ ```javascript
58
+ const Client = require("@fastpix/fastpix-node").default;
59
+ ```
60
+
61
+ # Initialization:
62
+
63
+ Initialize the FastPix SDK with your API credentials.
64
+
65
+ ```javascript
66
+ import Client from "@fastpix/fastpix-node";
67
+
68
+ const fastpix = new Client({
69
+ accessTokenId: "your-access-token-id",
70
+ secretKey: "your-secret-key",
71
+ });
72
+ ```
73
+
74
+ ## Example Usage:
75
+
76
+ Below is an example of configuring `FastPix Node SDK` into your project.
77
+
78
+ ```javascript
79
+ // Using import (ES Modules)
80
+ import Client from "@fastpix/fastpix-node";
81
+
82
+ // or using require (CommonJS)
83
+ // const Client = require("@fastpix/fastpix-node").default;
84
+
85
+ // Initialize the FastPix SDK with your Access Token ID and Secret Key
86
+ const fastpix = new Client({
87
+ accessTokenId: "your-access-token-id", // Replace with your Access Token ID
88
+ secretKey: "your-secret-key", // Replace with your Secret Key
89
+ });
90
+
91
+ async function main() {
92
+
93
+ // Create a request payload for uploading media from a URL
94
+ const uploadUrlRequest = {
95
+ inputs: [
96
+ {
97
+ type: "video",
98
+ url: "https://static.fastpix.io/sample.mp4",
99
+ },
100
+ ],
101
+ metadata: {
102
+ video_title: "Big_Buck_Bunny",
103
+ },
104
+ accessPolicy: "public",
105
+ };
106
+
107
+ const response = await fastpix.uploadMediaFromUrl(uploadUrlRequest);
108
+ console.log("Media Id:", response.data.id);
109
+ }
110
+
111
+ main();
112
+ ```
113
+
114
+ # Usage:
115
+
116
+ ## 1. Media Operations:
117
+
118
+ ### 1.1. Media Uploads:
119
+
120
+ #### Upload Media from a URL:
121
+
122
+ Use the `uploadMediaFromUrl` method to upload media directly from a URL. For detailed configuration options, refer to the [Create media from URL](./docs/VideoOnDemand/UploadMedia.md#method-uploadmediafromurl) API documentation.
123
+
124
+ ```javascript
125
+ // Define the request payload for uploading media from a URL.
126
+ const mediaFromUrlRequest = {
127
+ inputs: [
128
+ {
129
+ type: "video", // Specifies the type of media being uploaded (e.g., "video").
130
+ url: "https://static.fastpix.io/sample.mp4", // URL of the media file to be uploaded.
131
+ },
132
+ ],
133
+ metadata: {
134
+ video_title: "Big_Buck_Bunny", // Metadata to associate with the media, such as its title.
135
+ },
136
+ accessPolicy: "public", // Access policy for the media ("public" or "private").
137
+ };
138
+
139
+ const mediaFromUrlResponse =
140
+ await fastpix.uploadMediaFromUrl(mediaFromUrlRequest);
141
+ console.log("Upload Response:", mediaFromUrlResponse);
142
+ ```
143
+
144
+ #### Upload Media from a Local Device:
145
+
146
+ Use the `uploadMediaFromDevice` method to obtain a `signedUrl` and upload media directly from a local device. For more details on configuration options, refer to the [Upload media from device](./docs/VideoOnDemand/UploadMedia.md#method-uploadmediafromdevice) API documentation.
147
+
148
+ ```javascript
149
+ // Define the request payload for uploading media from a device.
150
+ const mediaFromDeviceRequest = {
151
+ corsOrigin: "*", // Specifies the allowed origin for CORS (Cross-Origin Resource Sharing). "*" allows all origins.
152
+ pushMediaSettings: {
153
+ accessPolicy: "private", // Sets the access policy for the uploaded media (e.g., "private" or "public").
154
+ optimizeAudio: true, // Enables audio optimization for the uploaded media.
155
+ maxResolution: "1080p", // Specifies the maximum resolution allowed for the uploaded media.
156
+ },
157
+ };
158
+
159
+ const mediaFromDeviceResponse = await fastpix.uploadMediaFromDevice(
160
+ mediaFromDeviceRequest
161
+ );
162
+ console.log("Upload Response:", mediaFromDeviceResponse);
163
+ ```
164
+
165
+ ### 1.2. Media Management:
166
+
167
+ #### Get List of All Media:
168
+
169
+ Use the `getAllMediaAssets` method to fetch a list of all media assets. You can customize the query by modifying parameters such as `limit`, `offset`, and `orderBy`. Refer to the [Get list of all media](./docs/VideoOnDemand/ManageMedia.md#method-getallmediaassets) API documentation for the accepted values.
170
+
171
+ ```javascript
172
+ // Define the parameters for fetching media assets in a separate variable.
173
+ const mediaQueryParams = {
174
+ limit: 20, // Number of assets to fetch in one request (between 1 and 50)
175
+ offset: 5, // Pagination starting position
176
+ orderBy: "asc" // Sorting order of the assets ("asc" for ascending)
177
+ };
178
+
179
+ const mediaAssets = await fastpix.getAllMediaAssets(mediaQueryParams);
180
+ console.log("Fetched Media Assets:", mediaAssets);
181
+ ```
182
+
183
+ #### Get Media Asset by ID:
184
+
185
+ Use the `getMediaAssetById` method to retrieve a specific media asset by its ID. Provide `mediaId`of the asset to fetch its details. Refer to the [Get a media by ID](./docs/VideoOnDemand/ManageMedia.md#method-getmediaassetbyid) API documentation for more details.
186
+
187
+ ```javascript
188
+ // Define the parameter for fetching a specific media asset by ID.
189
+ const mediaQueryParams = {
190
+ mediaId: "media-id", // Unique identifier for the media asset to be retrieved
191
+ };
192
+
193
+ const getMediaAsset = await fastpix.getMediaAssetById(mediaQueryParams);
194
+ console.log("Retrieved media asset by ID:", getMediaAsset);
195
+ ```
196
+
197
+ #### Update Media Asset:
198
+
199
+ Use the `updateMediaAsset` method to update metadata or other properties of a specific media asset. Provide the `mediaId` of the asset along with the metadata to be updated. Refer to the [Update a media by ID](./docs/VideoOnDemand/ManageMedia.md#method-updatemediaasset) API documentation for more details.
200
+
201
+ ```javascript
202
+ // Define the parameter for specifying the media asset to be updated.
203
+ const mediaAssetToUpdate = {
204
+ mediaId: "media-id", // Unique identifier for the media asset to update.
205
+ };
206
+
207
+ // Define the payload with the updates to be applied to the media asset.
208
+ const updatePayload = {
209
+ metadata: {
210
+ "key": "value", // Replace "key" and "value" with actual metadata entries.
211
+ "category": "nature" // Example of another metadata entry.
212
+ },
213
+ };
214
+
215
+ const updateMediaAsset = await fastpix.updateMediaAsset(
216
+ mediaAssetToUpdate,
217
+ updatePayload
218
+ );
219
+ console.log("Updated Media Asset:", updateMediaAsset);
220
+ ```
221
+
222
+ #### Delete Media Asset:
223
+
224
+ Use the `deleteMediaAsset` method to delete a specific media asset by its ID. Pass the `mediaId` of the asset you want to delete. Refer to the [Delete a media by ID](./docs/VideoOnDemand/ManageMedia.md#method-deletemediaasset) API documentation for more information.
225
+
226
+ ```javascript
227
+ // Define the parameter for specifying the media asset to be deleted.
228
+ const mediaAssetToDelete = {
229
+ mediaId: "media-id", // Unique identifier for the media asset to delete.
230
+ };
231
+
232
+ const deleteMediaAsset = await fastpix.deleteMediaAsset(mediaAssetToDelete);
233
+ console.log("Deleted Media Asset:", deleteMediaAsset);
234
+ ```
235
+
236
+ #### Get Media Asset Info:
237
+
238
+ Use the `getMediaAssetInfo` method to retrieve detailed information about a specific media asset. Pass the `mediaId` to fetch its details. Refer to the [Get info of media inputs](./docs/VideoOnDemand/ManageMedia.md#method-getmediaassetinfo) API documentation for more details.
239
+
240
+ ```javascript
241
+ // Define the parameter for specifying the media asset whose info is to be retrieved.
242
+ const mediaInfoRequest = {
243
+ mediaId: "media-id", // Unique identifier for the media asset.
244
+ };
245
+
246
+ const getMediaInfo = await fastpix.getMediaAssetInfo(mediaInfoRequest);
247
+ console.log("Media Asset Info:", getMediaInfo);
248
+ ```
249
+
250
+ ### 1.3. Manage Media Playback:
251
+
252
+ #### Generate Media Playback ID:
253
+
254
+ Use the `generateMediaPlaybackId` method to generate a playback ID for a specific media asset. You can pass an `mediaId` and configure options such as the `accessPolicy`. For detailed configuration options, refer to the [Create a playback ID](./docs/VideoOnDemand/ManageMediaPlayback.md#method-generatemediaplaybackid) API documentation.
255
+
256
+ ```javascript
257
+ // Define the mediaId and accessPolicy dynamically
258
+ const mediaPlaybackRequest = {
259
+ mediaId: "media-id", // Unique identifier for the media asset.
260
+ };
261
+
262
+ const playbackOptions = {
263
+ accessPolicy: "public", // Can be 'public' or 'private'.
264
+ };
265
+
266
+ const playbackIdResponse = await fastpix.generateMediaPlaybackId(
267
+ mediaPlaybackRequest, // Pass the mediaId
268
+ playbackOptions // Pass the accessPolicy
269
+ );
270
+
271
+ console.log("Playback ID Creation Response:", playbackIdResponse);
272
+ ```
273
+
274
+ #### Delete Media Playback ID:
275
+
276
+ Use the `deleteMediaPlaybackId` method to delete one or more playback IDs associated with a specific media asset. This method allows you to specify both the `mediaId` and the `playbackId` you wish to delete. This method supports deleting a **single playback ID** as a string or **multiple playback IDs** as an array of strings. For detailed configuration options, refer to the [Delete a playback ID](./docs/VideoOnDemand/ManageMediaPlayback.md#method-deletemediaplaybackid) API documentation.
277
+
278
+ ```javascript
279
+ const mediaId = "media-id"; // The ID of the media asset for which you want to delete the playback ID.
280
+ const playbackId = "playback-id"; // For deleting a single playback ID as a string.
281
+
282
+ // Example for multiple playback IDs:
283
+ // const playbackId = ["playback-id-1", "playback-id-2"]; // Pass an array of playback IDs to delete.
284
+
285
+ // Use the deleteMediaPlaybackId method to delete the specified playback ID(s).
286
+ const deletePlaybackResponse = await fastpix.deleteMediaPlaybackId({
287
+ mediaId: mediaId, // Pass the mediaId for which playback ID(s) are to be deleted
288
+ playbackId: playbackId, // Pass the playbackId(s) to delete.
289
+ });
290
+
291
+ console.log("Playback ID Deletion Response:", deletePlaybackResponse);
292
+ ```
293
+
294
+ ---
295
+
296
+ ## 2. Live Stream Operations:
297
+
298
+ ### 2.1. Start Live Stream:
299
+
300
+ Use the `initiateLiveStream` method to start a live stream with specific configurations. For detailed configuration options, refer to the [Create a new stream](./docs/Live/CreateLiveStream.md#method-initiatelivestream) API documentation.
301
+
302
+ ```javascript
303
+ const liveStreamRequest = {
304
+ playbackSettings: {
305
+ accessPolicy: "public", // Defines the access level of the live stream (public or private)
306
+ },
307
+ inputMediaSettings: {
308
+ maxResolution: "1080p", // Set the maximum resolution of the live stream
309
+ reconnectWindow: 1800, // Set the duration for reconnecting the stream in seconds
310
+ mediaPolicy: "private", // Define media policy (private or public)
311
+ metadata: {
312
+ liveStream: "fp_livestream", // Custom metadata for the live stream
313
+ },
314
+ enableDvrMode: true, // Enable DVR mode to allow viewers to rewind the live stream
315
+ },
316
+ };
317
+
318
+ // Initiating the live stream
319
+ const generateLiveStream = await fastpix.initiateLiveStream(liveStreamRequest);
320
+ console.log("Live Stream initiated successfully:", generateLiveStream);
321
+ ```
322
+
323
+ ### 2.2. Live Stream Management:
324
+
325
+ #### Get List of All Live Streams:
326
+
327
+ Use the `getAllLiveStreams` method to fetch a list of all live streams. You can customize the query by modifying parameters such as `limit`, `offset`, and `orderBy`. For detailed configuration options, refer to the [Get all live streams](./docs/Live/ManageLiveStreams.md#method-getalllivestreams) API documentation.
328
+
329
+ ```javascript
330
+ const getAllLiveStreamPagination = {
331
+ limit: 10, // Limit the number of live streams retrieved.
332
+ offset: 1, // Skip a specified number of streams for pagination.
333
+ orderBy: "asc", // Order the results based on the specified criteria ("asc" or "desc").
334
+ };
335
+
336
+ const getAllLiveStreams = await fastpix.getAllLiveStreams(
337
+ getAllLiveStreamPagination
338
+ );
339
+ console.log("All Live Streams:", getAllLiveStreams);
340
+ ```
341
+
342
+ #### Get Live Stream by ID:
343
+
344
+ Use the `getLiveStreamById` method to retrieve a specific live stream by its ID. Provide the `streamId` of the stream you wish to fetch. For more details, refer to the [Get stream by ID](./docs/Live/ManageLiveStreams.md#method-getlivestreambyid) API documentation.
345
+
346
+ ```javascript
347
+ const getLiveStreamById = await fastpix.getLiveStreamById({
348
+ streamId: "a09f3e958c16ed00e85bfe798abd9845", // Replace with actual stream ID
349
+ });
350
+
351
+ console.log("Live Stream Details:", getLiveStreamById);
352
+ ```
353
+
354
+ #### Update Live Stream:
355
+
356
+ Use the `updateLiveStream` method to update a live stream's configuration. Provide the `streamId` of the stream and specify the fields you want to update. For more details, refer to the [Update a stream](./docs/Live/ManageLiveStreams.md#method-updatelivestream) API documentation.
357
+
358
+ ```javascript
359
+ const updateLiveStreamRequest = {
360
+ metadata: {
361
+ livestream_name: "Game_streaming",
362
+ },
363
+ reconnectWindow: 100,
364
+ };
365
+
366
+ const updateLiveStream = await fastpix.updateLiveStream(
367
+ { streamId: "a09f3e958c16ed00e85bfe798abd9845" }, // Provide the stream ID for the live stream to update
368
+ updateLiveStreamRequest
369
+ );
370
+
371
+ console.log("Updated Live Stream:", updateLiveStream);
372
+ ```
373
+
374
+ #### Delete Live Stream:
375
+
376
+ Use the `deleteLiveStream` method to delete a live stream by its ID. Provide `streamId` of the stream you want to delete. For more details, refer to the [Delete a stream](./docs/Live/ManageLiveStreams.md#method-deletelivestream) API documentation.
377
+
378
+ ```javascript
379
+ const deleteLiveStream = await fastpix.deleteLiveStream({
380
+ streamId: "a09f3e958c16ed00e85bfe798abd9845", // Provide the stream ID of the live stream to delete
381
+ });
382
+ console.log("Deleted Live Stream:", deleteLiveStream);
383
+ ```
384
+
385
+ ### 2.3. Manage Live Stream Playback:
386
+
387
+ #### Generate Live Stream Playback ID:
388
+
389
+ Use the `generateLiveStreamPlaybackId` method to generate a playback ID for a live stream. Replace `streamId` with the actual ID of the live stream and specify the desired `accessPolicy`. For more details, refer to the [Create a playback ID](./docs/Live/ManageStreamPlayback.md#method-generatelivestreamplaybackid) API documentation.
390
+
391
+ ```javascript
392
+ const generateLiveStreamPlaybackId = await fastpix.generateLiveStreamPlaybackId(
393
+ { streamId: "a09f3e958c16ed00e85bfe798abd9845" }, // Pass the stream ID for which the playback ID is to be generated
394
+ { accessPolicy: "public" } // This can be "public" or "private" based on your needs
395
+ );
396
+
397
+ console.log("Generated Live Stream Playback ID:", generateLiveStreamPlaybackId);
398
+ ```
399
+
400
+ #### Delete Live Stream Playback ID:
401
+
402
+ Use the `deleteLiveStreamPlaybackId` method to remove one or more playback IDs associated with a live stream. This method allows you to specify the `streamId` of the live stream, and the `playbackId` you wish to delete. This method supports deleting a **single playback ID** as a string or **multiple playback IDs** as an array of strings. For more details, refer to the [Delete a playback ID](./docs/Live/ManageStreamPlayback.md#method-deletelivestreamplaybackid) API documentation.
403
+
404
+ ```javascript
405
+ // Define the streamId and playbackId dynamically
406
+ const streamId = "a09f3e958c16ed00e85bfe798abd9845";
407
+
408
+ // For single playbackId, pass it as a string
409
+ const playbackId = "632029b4-7c53-4dcf-a4d3-1884c29e90f8";
410
+
411
+ // For multiple playbackId's, pass them as an array of strings
412
+ // const playbackId = ["632029b4-7c53-4dcf-a4d3-1884c29e90f8", "687629b4-7c53-4dcf-a4d3-1884876540f8"];
413
+
414
+ const deleteLiveStreamPlaybackId = await fastpix.deleteLiveStreamPlaybackId({
415
+ streamId: streamId, // Pass the streamId of the live stream for which playback ID is to be deleted
416
+ playbackId: playbackId, // Pass the playbackId as an array (even for a single ID)
417
+ });
418
+
419
+ console.log("Deleted Live Stream Playback ID:", deleteLiveStreamPlaybackId);
420
+ ```
421
+
422
+ #### Get Live Stream Playback Policy:
423
+
424
+ Use the `getLiveStreamPlaybackPolicy` method to retrieve the playback policy for a specific live stream playback ID. Replace `streamId` with the stream's ID and `playbackId` with the actual playback ID to fetch the policy. For more details, refer to the [Get stream's playback ID](./docs/Live/ManageStreamPlayback.md#method-getlivestreamplaybackpolicy) API documentation.
425
+
426
+ ```javascript
427
+ const getLiveStreamPlaybackPolicy = await fastpix.getLiveStreamPlaybackPolicy({
428
+ streamId: "1c5e8abcc2080cba74f5d0ac91c7833e", // Replace with the actual stream ID
429
+ playbackId: "95ce872d-0b58-44f3-be72-8ed8b97ee2c9", // Replace with the actual playback ID
430
+ });
431
+
432
+ console.log("Live Stream Playback Policy:", getLiveStreamPlaybackPolicy);
433
+ ```
434
+
435
+ ### 2.4. Manage Live Stream Simulcast:
436
+
437
+ #### Initiate Live Stream Simulcast:
438
+
439
+ Use the `initiateLiveStreamSimulcast` method to create a new simulcast for a live stream. Provide the stream ID and simulcast payload with the URL and stream key. For more details, refer to the [Create a simulcast](./docs/Live/ManageStreamSimulcast.md#method-initiatelivestreamsimulcast) API documentation.
440
+
441
+ ```javascript
442
+ const simulcastPayload = {
443
+ url: "rtmps://live.fastpix.io:443/live",
444
+ streamKey:
445
+ "46c3457fa8a579b2d4da64125a2b6e83ka09f3e958c16ed00e85bfe798abd9845", // Replace with actual stream key
446
+ };
447
+
448
+ const generateSimulcast = await fastpix.initiateLiveStreamSimulcast(
449
+ {
450
+ streamId: "a09f3e958c16ed00e85bfe798abd9845", // Replace with actual stream ID
451
+ },
452
+ simulcastPayload
453
+ );
454
+
455
+ console.log("Generate Simulcast:", generateSimulcast);
456
+ ```
457
+
458
+ #### Get Live Stream Simulcast:
459
+
460
+ Use the `getLiveStreamSimulcast` method to retrieve details of a specific simulcast stream. Provide the `streamId` and `simulcastId` of the simulcast you want to fetch. For more details, refer to the [Get a specific simulcast of a stream](./docs/Live/ManageStreamSimulcast.md#method-getlivestreamsimulcast) API documentation.
461
+
462
+ ```javascript
463
+ const getLiveSimulcast = await fastpix.getLiveStreamSimulcast({
464
+ streamId: "a09f3e958c16ed00e85bfe798abd9845", // Replace with actual stream ID
465
+ simulcastId: "7269209ff0299319b6321c9a6e7850ff", // Replace with actual simulcast ID
466
+ });
467
+
468
+ console.log("Live Stream Simulcast Details:", getLiveSimulcast);
469
+ ```
470
+
471
+ #### Update Live Stream Simulcast:
472
+
473
+ Use the `updateLiveStreamSimulcast` method to update the configuration of a simulcast stream. Provide the `streamId`, `simulcastId`, and the fields you want to update. For more details, refer to the [Update a specific simulcast of a stream](./docs/Live/ManageStreamSimulcast.md#method-updatelivestreamsimulcast) API documentation.
474
+
475
+ ```javascript
476
+ const updateLiveSimulcast = await fastpix.updateLiveStreamSimulcast(
477
+ {
478
+ streamId: "a09f3e958c16ed00e85bfe798abd9845", // Replace with actual stream ID
479
+ simulcastId: "7269209ff0299319b6321c9a6e7850ff", // Replace with actual simulcast ID
480
+ },
481
+ {
482
+ isEnabled: false, // Disable the simulcast stream (set to true to enable)
483
+ metadata: {
484
+ simulcast2: "media", // Update the metadata as needed
485
+ },
486
+ }
487
+ );
488
+
489
+ console.log("Updated Live Stream Simulcast:", updateLiveSimulcast);
490
+ ```
491
+
492
+ #### Delete Live Stream Simulcast:
493
+
494
+ Use the `deleteLiveStreamSimulcast` method to remove a specific simulcast from a live stream. Provide the `streamId` and `simulcastId` for the simulcast you want to delete. For more details, refer to the [Delete a simulcast](./docs/Live/ManageStreamSimulcast.md#method-deletelivestreamsimulcast) API documentation.
495
+
496
+ ```javascript
497
+ const deleteLiveSimulcast = await fastpix.deleteLiveStreamSimulcast({
498
+ streamId: "a09f3e958c16ed00e85bfe798abd9845", // Replace with actual stream ID
499
+ simulcastId: "7269209ff0299319b6321c9a6e7850ff", // Replace with actual simulcast ID
500
+ });
501
+
502
+ console.log("Deleted Live Stream Simulcast:", deleteLiveSimulcast);
503
+ ```
504
+
505
+ ## Detailed Usage:
506
+
507
+ For a complete understanding of each API's functionality, including request and response details, parameter descriptions, and additional examples, please refer to the [FastPix API Reference](https://docs.fastpix.io/reference/signingkeys-overview).
508
+
509
+ The API reference provides comprehensive documentation for all available endpoints and features, ensuring developers can integrate and utilize FastPix APIs efficiently.
@@ -0,0 +1,19 @@
1
+ import type { AccessPolicy, RequestObject, InitiateLiveStreamProps, LiveStreamProps, PaginationProps, SimulcastObject, SimulcastProps, UpdateObject, UpdateSimulcastProps, FetcherProps } from "../../types";
2
+ declare class LiveStream {
3
+ livePath: string;
4
+ fetch: FetcherProps;
5
+ constructor();
6
+ createNewLiveStream(props: InitiateLiveStreamProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
7
+ getAllLiveStreams(props?: PaginationProps, requestObj?: RequestObject): Promise<import("../../types").FetchResponse>;
8
+ getLiveStream(props: LiveStreamProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
9
+ updateLiveStream(props: LiveStreamProps, updateObject: UpdateObject, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
10
+ deleteLiveStream(props: LiveStreamProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
11
+ createLiveStreamPlaybackId(props: LiveStreamProps, playbackPolicy: AccessPolicy, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
12
+ removeLivePlaybackId(props: LiveStreamProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
13
+ getLiveStreamPlaybackPolicy(props: LiveStreamProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
14
+ createLiveStreamSimulcast(props: LiveStreamProps, liveStreamObj: SimulcastObject, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
15
+ getLiveStreamSimulcast(props: SimulcastProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
16
+ updateLiveStreamSimulcast(props: SimulcastProps, simulcastObj: UpdateSimulcastProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
17
+ deleteLiveStreamSimulcast(props: SimulcastProps, requestObj: RequestObject): Promise<import("../../types").FetchResponse>;
18
+ }
19
+ export default LiveStream;