ElvClient/LiveStream

Methods for Live Stream creation and management

Source:

Methods

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

Load cached stream configuration

Returns: The configuration of the stream
Parameters:
Name Type Description
name string

Object ID or name of the live stream object

Source:

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

Configure the stream

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

  • audioBitrate
  • audioIndex
  • partTtl
  • channelLayout
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 StreamDeactivate({name}) → Promise.<Object>

Deactivate the stream

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

Object ID or name of the live stream object

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 StreamSetOfferingAndDRM({
name,
typeAbrMasteroptional,
typeLiveStreamoptional,
drmoptional,
formatoptional
})
→ Promise.<Object>

Set the Live Stream offering

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>

Stop the live stream session and close the edge write token. Not implemented fully

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: