Methods for Live Stream creation and management
- Source:
Methods
static AuditStream({objectIdoptional,versionHashoptional,saltoptional,samplesoptional,authorizationTokenoptional}) → Promise.<Object>
Audit the specified live stream against several content fabric nodes
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
objectId |
string |
<optional> |
Object ID of the live stream |
versionHash |
string |
<optional> |
Version hash of the live stream -- if not specified, latest version is returned |
salt |
string |
<optional> |
base64-encoded byte sequence for salting the audit hash |
samples |
Array.<number> |
<optional> |
list of percentages (0.0 - <1.0) used for sampling the content part list, up to 3 |
authorizationToken |
string |
<optional> |
Additional authorization token for this request |
- Source:
static StreamAddWatermark({libraryIdoptional,objectId,writeTokenoptional,simpleWatermark,imageWatermark,forensicWatermark,finalizeoptional}) → Promise.<Object>
Create a watermark for a live stream
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
libraryId |
string |
<optional> |
Library ID of the live stream |
objectId |
string |
Object ID of the live stream |
|
writeToken |
string |
<optional> |
Write token of the draft |
simpleWatermark |
Object |
Text watermark |
|
imageWatermark |
Object |
Image watermark |
|
forensicWatermark |
Object |
Forensic watermark |
|
finalize |
boolean |
<optional> |
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 } |
- 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": { ... } } }
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
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
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
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
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
siteId |
string |
<optional> |
ID of the live stream site object |
- Source:
static StreamRemoveWatermark({libraryIdoptional,objectId,writeTokenoptional,types,finalizeoptional}) → Promise.<Object>
Remove a watermark for a live stream
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
libraryId |
string |
<optional> |
Library ID of the live stream |
objectId |
string |
Object ID of the live stream |
|
writeToken |
string |
<optional> |
Write token of the draft |
types |
Array.<string> |
Specify which type of watermark to remove. Possible values:
|
|
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.
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)
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)
|
- Source:
static StreamStatus({name,stopLrooptional,showParamsoptional}) → Promise.<Object>
Retrieve the status of the current live stream session
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.
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
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: