Streams
Streams in backstage are stored under what we call edition objects. These are separate objects that reference the asset (so the asset needs to be saved before creating the edition). Right now each asset can have 2 editions: a full edition (the full video) and a trailer edition (an optional trailer), both of which can contain references to stream URL’s.
Editions
The edition objects contain the following properties:
property | type | usage |
---|---|---|
id | string | This field is auto generated when an edition is created |
asset_id | string | References the asset the edition belongs to |
label | string | Name of the edition, is not used anywhere at the moment |
editionType | string | Type of the edition, can be either: full or trailer |
streams | array | Contains stream reference objects |
subtitles | array | An array containing a list of externally available subtitles |
Streams
The stream reference objects contain the stream types available to an edition. These are returned to the client apps so they can select their preferred (drm) format before playout (for example iOS/tvOS would prefer hls/fairplay).
property | type | usage |
---|---|---|
url | string | URL to the actual manifest. |
type | string | The manifest type, can be: hls , dash , smoothstreaming , mp4 , mp3 |
drm | string | The type of DRM used for the stream, can be: unencrypted , fairplay , widevine , playready |
data | object | Data that can optionally be used for DRM requirements, should be not be used unless truly required as it can create quite rigid integration situations |
Once a stream is requested by the client apps through the edition object the system has the capability to perform some decoration (like tokenization) on it based on the OVP that’s configured.
Subtitles
The subtitle objects can be used to give the player access to subtitle tracks outside of the manifest
property | type | usage |
---|---|---|
label | string | The name of the subtitle |
language | string | An ISO 639-1 code denoting the language of the subtitle |
forced | boolean | Whether to force a subtitle, when set to true the player will auto-select it and not allow the user to switch. Only one subtitle object can be set to forced in the set |
sources | array | An array of subtitle sources, multiple types can be returned for the player to choose from (so same subtitle in multiple formats). |
sources.*.type | string | The subtitle file type, can be: ttml , webvtt , srt |
sources.*.url | string | The URL to the actual subtitle file |