Live Stream
Methods for Live Stream creation and management
AuditStream
objectId, // optional
versionHash, // optional
salt, // optional
samples, // optional
authorizationToken // optional
}) → Promise.<Object>
Audit the specified live stream against several content fabric nodes
Returns: Response describing audit results
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | Object ID of the live stream | |
versionHash | string | Version hash of the live stream -- if not specified, latest version is returned | |
salt | string | base64-encoded byte sequence for salting the audit hash | |
samples | Array.<number> | list of percentages (0.0 - <1.0) used for sampling the content part list, up to 3 | |
authorizationToken | string | Additional authorization token for this request |
FileInfo
path,
fileList
) → Promise.<Array.<Object>>
Converts a list of File objects into an array of file info objects suitable for upload.
Returns: Array of file info objects with path, type, size, mime_type, and data
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
path | string | ✓ | The destination path prefix for the files |
fileList | FileList | Array.<File> | ✓ | The list of File objects to process |
OutputsCreate
libraryId, // optional
objectId,
streamObjectId, // optional
name, // optional
description, // optional
nodeIds, // optional
geos, // optional
passphrase, // optional
stripRtp, // optional
srtConfig // optional
}) → Promise.<Object>
Create a new live output.
At the current version of the live outputs API an output will be pinned to a node, by either:
- specifying the node directly in 'nodeIds'
- specifying an 'elvgeo' and use fabric config 'live_egress' services to pick a node ID
Note: Output creation and modification is transactional. To create multiple outputs in a single transaction, use EditContentObject to open a write token, call CallBitcodeMethod for each output, then finalize with FinalizeContentObject. This method handles a single output end-to-end.
Returns: The created output
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the outputs settings object |
streamObjectId | string | Object ID of the input stream to use as the output source | |
name | string | Display name for the output | |
description | string | Description of the output | |
nodeIds | Array.<string> | Explicit node ID(s) for SRT delivery (max 1) | |
geos | Array.<string> | Geo regions for SRT delivery (max 1) — used to resolve a node from live_egress endpoints | |
passphrase | string | SRT passphrase for encrypted delivery | |
stripRtp | boolean | Whether to strip RTP headers (default: false) | |
srtConfig | Object | Additional SRT connection configuration (see openapi-bitcode.html#tocssrtconnectionconfig) |
OutputsDelete
libraryId, // optional
objectId,
outputId
}) → Promise.<Object>
Delete a live output.
Returns: Response from the delete call
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
outputId | string | ✓ | ID of the output to delete |
OutputsDeleteBatch
libraryId, // optional
objectId,
outputs
}) → Promise.<Object>
Delete multiple live outputs in a single operation.
Returns: Response from the delete call
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
outputs | Array.<string> | ✓ | List of output IDs to delete |
OutputsList
libraryId, // optional
objectId,
includeState // optional
}) → Promise.<Object.<string, LiveOutput>>
List all live outputs for a stream object, optionally including live state.
Returns: Map of output IDs to LiveOutput objects, each optionally with a state field
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
includeState | boolean | If true, also retrieve live state from each output's egress node (default: true) |
OutputsListItem
libraryId, // optional
objectId,
outputId,
includeState // optional
}) → Promise.<LiveOutput>
Get the configuration of a single live output by ID, optionally including live state.
Returns: Output config, optionally with a state field containing client_stats and srt_stats
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
outputId | string | ✓ | ID of the output to retrieve |
includeState | boolean | If true, also retrieve live state from the output's egress node (default: true) |
OutputsModify
libraryId, // optional
objectId,
outputId,
output,
writeToken, // optional
finalize // optional
}) → Promise.<Object>
Modify an existing live output.
Note: Supply all fields when modifying an output — read the current output first, then apply changes.
Note: Output modification is transactional. To modify multiple outputs in a single transaction, use EditContentObject to open a write token, call CallBitcodeMethod for each output, then finalize with FinalizeContentObject. This method handles a single output end-to-end.
Returns: The modified output
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
outputId | string | ✓ | ID of the output to modify |
output | LiveOutput | ✓ | Full output object to PUT (read the current output first, apply changes, then pass the result) |
writeToken | string | Write token to use. If not provided, a new edit will be opened. | |
finalize | boolean | If true, finalize after modifying (default: true) |
OutputsModifyBatch
libraryId, // optional
objectId,
outputs
}) → Promise.<Object>
Modify multiple live outputs in a single transaction.
Takes a map of output IDs to partial output configurations. Routes to any eligible live egress node, opens a write token, posts the map to live/outputs, then finalizes.
Example: { "out001": { "enabled": false, "input": { "stream": "iq__..." }, "name": "A03" }, "out002": { "enabled": true } }
Returns: The response from the bitcode call
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
outputs | Object.<string, LiveOutput> | ✓ | Map of output IDs to output configurations |
OutputsState
libraryId, // optional
objectId,
outputId,
nodeId, // optional
includeState // optional
}) → Promise.<LiveOutput>
Get the configuration of a specific live output, optionally including live state. Retrieves the output config from a live egress node. If includeState is true, also queries the output's specific egress node for live client and SRT stats.
Returns: Output config, optionally with a state field containing client_stats and srt_stats
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
outputId | string | ✓ | ID of the output to retrieve state for |
nodeId | string | Node ID to query for state. If not provided, it will be retrieved from the output's config. | |
includeState | boolean | If true, also retrieve live state from the output's egress node (default: true) |
OutputsStop
libraryId, // optional
objectId,
outputId
}) → Promise.<Object>
Stop a live output.
Returns: Response from the stop call
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the output settings object. If not provided, it will be retrieved automatically. | |
objectId | string | ✓ | Object ID of the output settings object |
outputId | string | ✓ | ID of the output to stop |
RetrieveOutputNodeId
client,
nodeIds, // optional
geos // optional
) → Promise.<string>
Resolve a node ID for live egress output. If nodeIds is provided, uses the first element directly. Otherwise, calls the /config API (optionally filtered by geo) to get live_egress endpoints, then resolves the first endpoint to a node ID via SpaceNodes.
Returns: A node ID for the output
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
client | Object | ✓ | ElvClient instance |
nodeIds | Array.<string> | Explicit node IDs to use | |
geos | Array.<string> | Geo regions to filter config API results (max 1) |
RouteToLiveEgress
Pin (route) the client to any eligible live egress node from the /config API. Returns a function that restores the original fabric URIs.
Returns: restore function
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
client | Object | ✓ | ElvClient instance |
RouteToOutputNode
client,
libraryId,
objectId,
outputId,
nodeId // optional
) → Promise.<{restore: function(), config: Object}>
Pin (route) the client to the egress node for a specific output. Fetches the output config to determine the node ID then sets the client fabric URIs. Currently node ID is retrieved from srt_pull.node_ids (only srt_pull outputs are supported). Assumes the client is already routed to an eligible egress node (via RouteToLiveEgress). Returns a function that restores the original fabric URIs.
Returns: restore function and output config
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
client | Object | ✓ | ElvClient instance |
libraryId | string | ✓ | Library ID of the output settings object |
objectId | string | ✓ | Object ID of the output settings object |
outputId | string | ✓ | ID of the output |
nodeId | string | Node ID if already known (skips config fetch) |
StreamAddWatermark
libraryId, // optional
objectId,
writeToken, // optional
simpleWatermark,
imageWatermark,
forensicWatermark,
finalize // optional
}) → Promise.<Object>
Create a watermark for a live stream
Returns: The finalize response
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the live stream | |
objectId | string | ✓ | Object ID of the live stream |
writeToken | string | Write token of the draft | |
simpleWatermark | Object | ✓ | Text watermark |
imageWatermark | Object | ✓ | Image watermark |
forensicWatermark | Object | ✓ | Forensic watermark |
finalize | boolean | If enabled, target object will be finalized after adding watermark Watermark examples: Simple Watermark: { "font_color": "", "font_relative_height": 0, "shadow": false, "template": "", "timecode": "", "timecode_rate": 0, "x": "", "y": "" } Image watermark: { "image": "", "align_h": "", "align_v": "", "target_video_height": 0, "wm_enabled": false } Forensic watermark: { "algo": 6, "forensic_duration": 0, "forensic_start": "", "image_a": <path_to_image>, "image_b": <path_to_image>, "is_stub": true, "payload_bit_nb": 23, "wm_enabled": true } |
StreamApplyProfile
profileSlug, // optional
profile, // optional
objectId,
streamWriteToken, // optional
siteWriteToken, // optional
finalize // optional
}) → Promise.<({config: Object}|{streamWriteToken: string, siteWriteToken: string})>
Apply a live recording config profile to a stream, writing the merged configuration to the stream's live_recording_config and updating the profile's stream index on the site object. Handles switching profiles by unassigning the previous profile from the index. Use this for CLI workflows. For app workflows managing the config edit separately, use StreamAssignProfile directly.
Returns: The merged config if finalized, otherwise the open write tokens
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileSlug | string | Slug of the profile to apply. Required if profile is not provided. | |
profile | Object | Profile object to apply. Required if profileSlug is not provided. If both are provided, profile is used and profileSlug is derived from profile.name. | |
objectId | string | ✓ | Object ID of the stream to apply the profile to |
streamWriteToken | string | Write token for the stream object. If not provided, a new edit will be opened. | |
siteWriteToken | string | Write token for the site object. If not provided, a new edit will be opened. | |
finalize | boolean | If enabled, both the stream and site objects will be finalized (default: true) |
StreamAssignProfile
profileSlug,
streamObjectId,
writeToken, // optional
finalize // optional
}) → Promise.<void>
Assign a live recording config profile to a stream by adding the stream to the profile's stream index on the site object. If the stream is already assigned, this is a no-op.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileSlug | string | ✓ | Slug of the profile to assign |
streamObjectId | string | ✓ | Object ID of the stream to assign the profile to |
writeToken | string | Write token for the site object. If not provided, a new edit will be opened and finalized. | |
finalize | boolean | If enabled, the site object will be finalized after the assignment (default: true) |
StreamConfig
name,
liveRecordingConfig, // optional
inputStreamInfo, // optional
writeToken, // optional
finalize // optional
}) → Promise.<Object>
Configure the stream based on built-in logic and optional custom settings.
Returns: The status response for the stream
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
liveRecordingConfig | LiveRecordingConfig | Configuration profile for the live stream including recording, playout, and transcoding settings | |
inputStreamInfo | InputStreamInfo | Simplified probe metadata | |
writeToken | string | Write token of the draft | |
finalize | boolean | If enabled, target object will be finalized after configuring |
StreamConfigProfile
profileName,
profileSlug
}) → Promise.<Object>
Get a specific live recording config profile's specifications by name.
Returns: The specifications for the requested profile
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileName | string | ✓ | Name of the profile to retrieve |
profileSlug | string | ✓ | Slug of the profile to retrieve |
StreamConfigProfiles
Get all available live recording config profiles from the live stream site configuration. Ladder profiles define settings for configuring live streams including recording config, playout config, and recording params.
Returns: Object containing all live recording config profiles
StreamCreate
libraryId,
objectId, // optional
url,
finalize, // optional
liveRecordingConfig, // optional
options // optional
}) → Promise.<Object>
Create a live stream object
Returns: Object containing objectId, libraryId, writeToken, and hash if finalized
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | ID of the library for the new live stream object |
objectId | string | ID of the object | |
url | string | ✓ | Source stream URL |
finalize | boolean | If enabled, object will be finalized after creation (default: true) | |
liveRecordingConfig | LiveRecordingConfig | Configuration profile for the live stream including recording, playout, and transcoding settings | |
options | Object | Additional options for customizing a live stream | |
options.name | string | Name of the live stream | |
options.displayTitle | string | Display title for the live stream | |
options.description | string | Description for the live stream | |
options.accessGroups | Array.<string> | Access group addresses to receive 'manage' permissions | |
options.permission | string | Permission level to set on the object | |
options.linkToSite | boolean | If enabled, will create a link in the live stream site | |
options.initializeDrm | boolean | If enabled, will initialize DRM for the object | |
options.ingressNodeId | string | ID of the ingress node used for stream allocation (required for non-public nodes) |
StreamGenerateOffering
client,
libraryId,
objectId,
writeToken, // optional
typeAbrMaster, // optional
typeLiveStream, // optional
streamUrl,
abrProfile,
aBitRate,
aChannels,
aSampleRate,
aStreamIndex,
aTimeBase,
aChannelLayout,
vBitRate,
vHeight,
vStreamIndex,
vWidth,
vDisplayAspectRatio,
vFrameRate,
vTimeBase
}) → Promise.<string>
Set the offering for the live stream
Returns: Final hash of the live stream object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
client | Object | ✓ | The client object |
libraryId | string | ✓ | ID of the library for the new live stream object |
objectId | string | ✓ | ID of the new live stream object |
writeToken | string | Write token of the draft | |
typeAbrMaster | string | Content type hash | |
typeLiveStream | string | Content type hash | |
streamUrl | string | ✓ | Live source URL |
abrProfile | object | ✓ | ABR Profile for the offering |
aBitRate | number | ✓ | Audio bitrate |
aChannels | number | ✓ | Audio channels |
aSampleRate | number | ✓ | Audio sample rate |
aStreamIndex | number | ✓ | Audio stream index |
aTimeBase | string | ✓ | Audio time base as a fraction, e.g. "1/48000" (usually equal to 1/aSampleRate) |
aChannelLayout | string | ✓ | Channel layout, e.g. "stereo" |
vBitRate | number | ✓ | Video bitrate |
vHeight | number | ✓ | Video height |
vStreamIndex | number | ✓ | Video stream index |
vWidth | number | ✓ | Video width |
vDisplayAspectRatio | string | ✓ | Display aspect ratio as a fraction, e.g. "16/9" |
vFrameRate | string | ✓ | Frame rate as an integer, e.g. "30" |
vTimeBase | string | ✓ | Time base as a fraction, e.g. "1/30000" |
StreamInitialize
name,
drm, // optional
format, // optional
writeToken, // optional
finalize // optional
}) → Promise.<Object>
Initialize the stream object
Returns: The name, object ID, and state of the stream
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
drm | boolean | If specified, playout will be DRM protected | |
format | string | Specify the list of playout formats and DRM to support, comma-separated (hls-clear, hls-aes128, hls-sample-aes, hls-fairplay) | |
writeToken | string | Write token of the draft | |
finalize | boolean | If enabled, target object will be finalized after configuration |
StreamInsertion
name,
insertionTime,
sinceStart, // optional
duration, // optional
targetHash,
remove // optional
}) → Promise.<Object>
Add a content insertion entry
Returns: Insertions, as well as any errors from bad insertions
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
insertionTime | number | ✓ | Time in seconds (float) |
sinceStart | boolean | If specified, time specified will be elapsed seconds since stream start, otherwise, time will be elapsed since epoch | |
duration | number | Time in seconds (float). Default: 20.0 | |
targetHash | string | ✓ | The target content object hash (playable) |
remove | boolean | If specified, will remove the inseration at the exact 'time' (instead of adding) |
StreamLinkToSite
Link a live stream object to a site by adding it to the site's live_streams metadata. Creates a fabric link to the stream object with proper ordering.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | ✓ | Object ID of the live stream to link to the site |
StreamListUrls
List the pre-allocated URLs for a site
Returns: The list of stream URLs
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
siteId | string | ID of the live stream site object |
StreamRemoveLinkToSite
objectId, // optional
slug, // optional
siteObjectId, // optional
siteLibraryId, // optional
writeToken, // optional
finalize // optional
}) → Promise.<void>
Unlink a live stream object from a site by removing it from the site's live_streams metadata.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
objectId | string | Object ID of the live stream to link to the site | |
slug | string | Slug of the object | |
siteObjectId | string | Object ID of the site (defaults to rootStore.dataStore.siteId) | |
siteLibraryId | string | Library ID of the site (defaults to rootStore.dataStore.siteLibraryId) | |
writeToken | string | Write token for the draft object. If not provided, a new edit will be opened and finalized. | |
finalize | boolean | If enabled, the site object will be finalized after the removal (default: true) |
StreamRemoveWatermark
libraryId, // optional
objectId,
writeToken, // optional
types,
finalize // optional
}) → Promise.<Object>
Remove a watermark for a live stream
Returns: The finalize response
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | Library ID of the live stream | |
objectId | string | ✓ | Object ID of the live stream |
writeToken | string | Write token of the draft | |
types | Array.<string> | ✓ | Specify which type of watermark to remove. Possible values:
|
finalize | boolean | If enabled, target object will be finalized after removing watermark |
StreamSaveConfigProfile
files,
profileMetadata // optional
}) → Promise.<void>
Save a live recording config profile to the live stream site object. Uploads any provided profile files or profile metadata and creates a metadata link to the profile. One must be specified. The argument profileMetadata takes precendence if both are provided.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
files | FileList | Array.<File>= | ✓ | Profile files to upload to the site object |
profileMetadata | Object | Metadata for the profile |
StreamSetOfferingAndDRM
name,
typeAbrMaster, // optional
typeLiveStream, // optional
drm, // optional
format, // optional
writeToken // optional
}) → Promise.<Object>
Create a dummy VoD offering and initialize DRM keys.
Returns: The name, object ID, and state of the stream
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
typeAbrMaster | string | Content type hash | |
typeLiveStream | string | Content type hash | |
drm | boolean | If specified, DRM will be applied to the stream | |
format | string | A list of playout formats and DRM to support, comma-separated (hls-clear, hls-aes128, hls-sample-aes, hls-fairplay). If specified, this will take precedence over the drm value | |
writeToken | string | Write token of the draft |
StreamSiteSettings
resolveIncludeSource, // optional
resolveLinks, // optional
resolveIgnoreErrors // optional
}) → Promise.<Object>
Load live stream data from site object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
resolveIncludeSource | boolean | If specified, resolved links will include the hash of the link at the root of the metadata | |
resolveLinks | boolean | If specified, links in the metadata will be resolved | |
resolveIgnoreErrors | boolean | If specified, link errors within the requested metadata will not cause the entire response to result in an error |
StreamStartOrStopOrReset
name,
op
}) → Promise.<Object>
Start, stop or reset a stream within the current session (current edge write token)
Returns: The status response for the stream
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
op | string | ✓ | The operation to perform. Possible values: 'start' 'reset' - Stops current LRO recording and starts a new one. Does not create a new edge write token (just creates a new recording period in the existing edge write token)
|
StreamStartRecording
name,
start // optional
}) → Promise.<Object>
Create a new edge write token
Returns: The status response for the object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
start | boolean | If specified, will start the stream after creation |
StreamStatus
name,
showParams // optional
}) → Promise.<Object>
Retrieve the status of the current live stream session
Returns: The status response for the object, as well as logs, warnings and errors from the master initialization
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
showParams | boolean | If specified, will return recording_params with status States: unconfigured - no live_recording_config uninitialized - no live_recording config generated inactive - live_recording config initialized but no 'edge write token' stopped - edge-write-token but not started starting - LRO running but no source data yet running - stream is running and producing output stalled - LRO running but no source data (so not producing output) |
StreamStopRecording
Close the edge write token and make the stream object inactive.
Returns: The finalize response for the stream object
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✓ | Object ID or name of the live stream object |
StreamUnassignProfile
profileSlug,
streamObjectId,
writeToken, // optional
finalize // optional
}) → Promise.<void>
Unassign a live recording config profile from a stream by removing the stream from the profile's stream index on the site object.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileSlug | string | ✓ | Slug of the profile to unassign |
streamObjectId | string | ✓ | Object ID of the stream to remove from the profile |
writeToken | string | Write token for the site object. If not provided, a new edit will be opened and finalized. | |
finalize | boolean | If enabled, the site object will be finalized after the unassignment (default: true) |
StreamUpdateConfig
libraryId,
objectId,
commitMessage,
writeToken, // optional
liveRecordingConfig,
overrideSettings, // optional
finalize // optional
}) → Promise.<({writeToken: string}|void)>
Update the live recording configuration of a stream object.
Returns: The write token if finalize is false, otherwise void
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | Library ID of the stream object |
objectId | string | ✓ | Object ID of the stream |
commitMessage | string | ✓ | Message to include about this commit |
writeToken | string | Write token for the stream object. If not provided, a new edit will be opened. | |
liveRecordingConfig | LiveRecordingConfig | ✓ | The live recording configuration to write |
overrideSettings | Object | Partial LiveRecordingConfig deep-merged over liveRecordingConfig | |
finalize | boolean | If enabled, the stream object will be finalized after the update (default: true) |