ElvClient/LiveStream

Methods for Live Stream creation and management

Source:

Methods

static StreamAddWatermark({
objectId,
simpleWatermark,
imageWatermark,
finalizeoptional
})
→ Promise.<Object>

Create a watermark for a live stream

Returns: The finalize response
Parameters:
Name Type Attributes Description
objectId string

Object ID of the live stream

simpleWatermark Object

Text watermark

imageWatermark Object

Image watermark

finalize boolean <optional>

If enabled, target object will be finalized after adding watermark

Source:

static StreamConfig({
name,
customSettingsoptional,
probeMetadataoptional
})
→ Promise.<Object>

Configure the stream based on built-in logic and optional custom settings.

Custom settings format: { "audio" { "1" : { // This is the stream index "tags" : "language: english", "codec" : "aac", "bitrate": 204000, "record": true, "recording_bitrate" : 192000, "recording_channels" : 2, "playout": bool "playout_label": "English (Stereo)" }, "3": { ... } } }

Returns: The status response for the stream
Parameters:
Name Type Attributes Description
name string

Object ID or name of the live stream object

customSettings Object <optional>

Additional options to customize configuration settings

probeMetadata Object <optional>

Metadata for the probe. If not specified, a new probe will be configured

Source:

static StreamCreate({
name,
startoptional
})
→ Promise.<Object>

Create a new edge write token

Returns: The status response for the object
Parameters:
Name Type Attributes Description
name string

Object ID or name of the live stream object

start boolean <optional>

If specified, will start the stream after creation

Source:

static StreamInitialize({
name,
drmoptional,
formatoptional
})
→ Promise.<Object>

Initialize the stream object

Returns: The name, object ID, and state of the stream
Parameters:
Name Type Attributes Description
name string

Object ID or name of the live stream object

drm boolean <optional>

If specified, playout will be DRM protected

format string <optional>

Specify the list of playout formats and DRM to support, comma-separated (hls-clear, hls-aes128, hls-sample-aes, hls-fairplay)

Source:

static StreamInsertion({
name,
insertionTime,
sinceStartoptional,
durationoptional,
targetHash,
removeoptional
})
→ Promise.<Object>

Add a content insertion entry

Returns: Insertions, as well as any errors from bad insertions
Parameters:
Name Type Attributes Description
name string

Object ID or name of the live stream object

insertionTime number

Time in seconds (float)

sinceStart boolean <optional>

If specified, time specified will be elapsed seconds since stream start, otherwise, time will be elapsed since epoch

duration number <optional>

Time in seconds (float). Default: 20.0

targetHash string

The target content object hash (playable)

remove boolean <optional>

If specified, will remove the inseration at the exact 'time' (instead of adding)

Source:

static StreamListUrls({siteIdoptional}) → Promise.<Object>

List the pre-allocated URLs for a site

Returns: The list of stream URLs
Parameters:
Name Type Attributes Description
siteId string <optional>

ID of the live stream site object

Source:

static StreamRemoveWatermark({
objectId,
types,
finalizeoptional
})
→ Promise.<Object>

Remove a watermark for a live stream

Returns: The finalize response
Parameters:
Name Type Attributes Description
objectId string

Object ID of the live stream

types Array.<string>

Specify which type of watermark to remove. Possible values:

  • "image"
  • "text"
finalize boolean <optional>

If enabled, target object will be finalized after removing watermark

Source:

static StreamSetOfferingAndDRM({
name,
typeAbrMasteroptional,
typeLiveStreamoptional,
drmoptional,
formatoptional
})
→ Promise.<Object>

Create a dummy VoD offering and initialize DRM keys.

Returns: The name, object ID, and state of the stream
Parameters:
Name Type Attributes Description
name string

Object ID or name of the live stream object

typeAbrMaster string <optional>

Content type hash

typeLiveStream string <optional>

Content type hash

drm boolean <optional>

If specified, DRM will be applied to the stream

format string <optional>

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

Source:

static 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 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)

  • 'stop'
Source:

static StreamStatus({
name,
stopLrooptional,
showParamsoptional
})
→ 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 Attributes Description
name string

Object ID or name of the live stream object

stopLro boolean <optional>

If specified, will stop LRO

showParams boolean <optional>

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)

Source:

static StreamStopSession({name}) → Promise.<Object>

Close the edge write token and make the stream object inactive.

Returns: The finalize response for the stream object
Parameters:
Name Type Description
name string

Object ID or name of the live stream object

Source:

async, inner StreamGenerateOffering({
client,
libraryId,
objectId,
typeAbrMasteroptional,
typeLiveStreamoptional,
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 Attributes 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

typeAbrMaster string <optional>

Content type hash

typeLiveStream string <optional>

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"

Source: