ABRPublishing
Methods for ABR video creation and management
For more information on how to publish ABR content see this detailed guide
CreateABRMezzanine
abrProfile, // optional
addlOfferingSpecs, // optional
description, // optional
keepOtherStreams, // optional
libraryId,
masterVersionHash,
masterWriteToken, // optional
writeToken, // optional
metadata, // optional
name,
objectId, // optional
offeringKey, // optional
respLogLevel, // optional
structLogLevel, // optional
streamKeys,
type, // optional
variant // optional
}) → Object
Create (or edit) a mezzanine offering based on a given master content object version and variant key
Returns: The finalize response for the object, as well as logs, warnings and errors from the mezzanine initialization
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
abrProfile | Object | Custom ABR profile. If not specified, the profile of the mezzanine library will be used | |
addlOfferingSpecs | Object | Specs for additional offerings to create by patching the offering being created/edited | |
description | string | Description for mezzanine content object | |
keepOtherStreams | boolean | If objectId is specified, whether to preserve existing streams with keys other than the ones specified in production master (default:false) | |
libraryId | string | ✓ | ID of the mezzanine library |
masterVersionHash | string | ✓ | The version hash of the production master content object |
masterWriteToken | string | The write token of the production master content object draft. | |
writeToken | string | The write token of the mezzanine object draft. If specified, the object will not be finalized, and no extra version of the object will be created to hold "bread crumb" metadata entry /lro_draft | |
metadata | Object | Additional metadata for mezzanine content object | |
name | string | ✓ | Name for mezzanine content object |
objectId | string | ID of existing object (if not specified, new object will be created) | |
offeringKey | string | The key of the offering to create (default:default) | |
respLogLevel | "warn" | "info" | "debug" | The level of logging to return in http response (default:warn) | |
structLogLevel | "none" | "error" | "warn" | "info" | "debug" | The level of logging to save to object metadata (default:none) | |
streamKeys | Array.<string> | ✓ | List of stream keys from variant to include. If not supplied all streams will be included. |
type | string | ID or version hash of the content type for the mezzanine | |
variant | string | What variant of the master content object to use (default:default) |
CreateProductionMaster
libraryId,
type, // optional
name,
description, // optional
contentTypeName,
writeToken, // optional
metadata, // optional
fileInfo, // optional
encrypt, // optional
copy, // optional
callback, // optional
respLogLevel, // optional
structLogLevel, // optional
access // optional
}) → Object
Create a master media content object with the given files.
- If uploading using local files, use fileInfo parameter (see UploadFiles for format)
- If uploading from S3 bucket, use access, filePath and copy, parameters (see UploadFilesFromS3 method)
Returns: The finalize response for the object, as well as logs, warnings and errors from the master initialization
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | ID of the library |
type | string | ID or version hash of the content type for this master | |
name | string | ✓ | Name of the content |
description | string | Description of the content | |
contentTypeName | string | ✓ | Name of the content type to use |
writeToken | string | Write token of the draft. If specified, the object will not be finalized. | |
metadata | Object | Additional metadata for the content object | |
fileInfo | Array.<Object> | Files to upload (See UploadFiles/UploadFilesFromS3 method) | |
encrypt | boolean | (Local or copied files only) - Unless true) | |
copy | boolean | (S3) If specified, files will be copied from S3 (default:false) | |
callback | function | Progress callback for file upload (See UploadFiles/UploadFilesFromS3 method) | |
respLogLevel | "warn" | "info" | "debug" | The level of logging to return in http response (default:warn) | |
structLogLevel | "none" | "error" | "warn" | "info" | "debug" | The level of logging to save to object metadata (default:none) | |
access | Array.<Object> | Array of cloud credentials, along with path matching regex strings - Required if any files in the masters are cloud references (currently only AWS S3 is supported)
[) |
FinalizeABRMezzanine
libraryId,
objectId,
writeToken, // optional
preFinalizeFn, // optional
preFinalizeThrow // optional
}) → Promise.<Object>
Process completed mezzanine transcoding LRO(s), creating the final offering(s) from the transcode(s) Unless a writeToken is passed in, finalize the mez object working draft as well.
If a writeToken is not passed in, then it will be retrieved from /lro_draft of most recent version of object. This is a "bread crumb" entry that gets created by StartABRMezzanineJobs() - unless a writeToken was passed in to StartABRMezzanineJobs() also.
Returns: The finalize response for the mezzanine object, as well as any logs, warnings and errors from the finalization
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | ID of the mezzanine library |
objectId | string | ✓ | ID of the mezzanine object |
writeToken | string | Write token for the mezzanine object. If specified, the object will not be finalized. | |
preFinalizeFn | function | A function to call before finalizing changes, to allow further modifications to offering. The function will be invoked with {elvClient, nodeUrl, writeToken} to allow access to the draft and MUST NOT finalize the draft. | |
preFinalizeThrow | boolean | If set to |
LRODraftInfo
libraryId,
objectId
}) → Promise.<Object>
Retrieve node and write token for a mezzanine's current offering preparation job (if any). Also returns the offering key.
This information is contained in metadata at /lro_draft, in an extra version of the object that gets created and finalized as part of creating a mezzanine. This serves as a "bread crumb trail" to allow users to find the active draft/write token that the ingest LROs are writing to.
Returns: LRO status
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | ID of the library |
objectId | string | ✓ | ID of the object |
LROStatus
libraryId,
objectId,
writeToken // optional
}) → Promise.<Object>
Retrieve status information for mezzanine transcoding jobs, aka long running operations (LROs) on the given object. If a write token is passed in, its draft will be checked directly by lookiing at /lro_status. If a write token is not passed in, then the latest version of objectId will be checked for "bread crumb" entry at /lro_draft, to determine the write token that current ingest LRO(s) are writing to.
Returns: LRO status
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | ID of the library |
objectId | string | ✓ | ID of the object |
writeToken | string | Write token of the active draft (that the transcode LROs are writing to) |
StartABRMezzanineJobs
libraryId,
objectId,
writeToken, // optional
access, // optional
jobIndexes
}) → Promise.<Object>
Start transcoding jobs previously set up by CreateABRMezzanine() on the specified mezzanine
Returns: A write token for the mezzanine object, as well as any logs, warnings and errors from the job initialization
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
libraryId | string | ✓ | ID of the mezzanine library |
objectId | string | ✓ | ID of the mezzanine object |
writeToken | string | Write token of the mezzanine object draft. If provided, no "bread crumb" metadata /lro_draft will be created, nor saved as an extra finalized version | |
access | Array.<Object> | Array of S3 credentials, along with path matching regexes - Required if any files in the masters are S3 references (See CreateProductionMaster method)
| |
jobIndexes | Array.<number> | ✓ | Array of LRO job indexes to start. LROs are listed in a map under metadata key /abr_mezzanine/offerings/(offeringKey)/mez_prep_specs/, and job indexes start with 0, corresponding to map keys in alphabetical order |