@dolbyio/dolbyio-rest-apis-client
Version:
Node.JS wrapper for the Dolby OptiView REST APIs
153 lines (152 loc) • 6.17 kB
TypeScript
import { ListSortOptions } from './core';
/** Status of a transcoder. */
export type TranscoderStatus = 'Provisioning' | 'Active' | 'Error' | 'Shutdown' | 'Deleted' | 'ShuttingDown' | 'Starting' | 'Deleting';
/** Represents the options to sort the response for listing transcoders. */
export interface ListTranscodersSortOptions extends ListSortOptions<'CreatedDate'> {
/** List the transcoders with this status. */
status?: TranscoderStatus;
/** Returns only Transcoders for the given cluster(s). */
cluster?: string[];
/** Returns only Transcoders that match the given string. Will include partial sub-string matches. */
transcoderName?: string;
}
/** Represents the options to sort the response for listing transcoders. */
export interface ListTranscodersInstancesSortOptions extends ListSortOptions<'CreatedDate'> {
/** List the transcoders with this status. */
status?: TranscoderStatus;
/** List the instances for this transcoder. */
transcoderId?: string;
/** */
startDate?: string;
/** */
endDate?: string;
}
/** Represents the options to sort the response for listing transcoder profiles. */
export interface ListTranscodersProfilesSortOptions extends ListSortOptions<'Name' | 'Height' | 'FrameRate'> {
}
/** Represents a cloud transcoder. */
export interface Transcoder {
/** Identifier of the transcoder. */
transcoderId: string;
/** Display name of the transcoder. */
name: string;
/** A string corresponding to the region that this transcoder is be deployed to. */
cluster: string;
/** DNS name of the transcoder. */
dnsName: string;
/** Profile selected by user or derived from input height and frame rate. */
profile?: TranscoderProfile;
/** Transcoder creation date. */
createdOn: Date;
/** Date when the transcoded was ended. */
endedOn?: Date;
/** Information on the most recent transcoder instance. */
instance?: TranscoderInstance;
/** Current status of the transcoder. */
status: TranscoderStatus;
/** List of publish URLs for different ingest protocols. */
publishUrls: {
/** Publish URL for RTMP protocol. */
rtmp: string;
/** Publish URL for RTMPs protocol. */
rtmps: string;
/** Publish URL for SRT protocol. */
srt: string;
};
}
/** Represents a transcoder profile. */
export interface TranscoderProfile {
/** Identifier of the transcoder profile. */
profileId: string;
/** Name of the transcoder profile. */
name: string;
/** Description of the transcoder profile. */
description: string;
/** Resolution of input stream specified in video height. */
height: number;
/** Frame rate of input stream. */
frameRate: number;
/** */
isDefault?: boolean;
/** Indicates that the top layer is used as is and bypasses transcoding without additional processing. */
passThrough: boolean;
/**
* The layers the Transcoder will produce for distribution.
* These values are pre-determined following the Millicast bitrate ladder as step-down layers from the overall Transcoder configuration.
*/
layers: {
/** The height for this layer. */
height?: number;
/** The width for this layer. */
width?: number;
/** The target frames-per-second for this layer. */
fps?: number;
/** The codec used for this layer. */
codec?: string;
/** The target bitrate for this layer. */
bitrate?: number;
/** The I-Frame interval for this layer. */
intraPeriod?: number;
/** Allow transrating of layer. */
allowTransrating?: boolean;
}[];
}
/** Represents a transcoder instance. */
export interface TranscoderInstance {
/** Identifier of the transcoder instance. */
instanceId: string;
/** Identifier of the transcoder. */
transcoderId?: string;
/** DNS name of the transcoder which follows the format of `dnsPrefix-accountId.transcoder.millicast.com`. */
dnsName: string;
/** Time when this transcoder instance was created. */
createdOn: Date;
/** Time when this transcoder instance ended. */
endedOn?: Date;
/** Current status of the transcoder instance. */
status: TranscoderStatus;
}
/** Represents a cloud transcoder creation request. */
export interface CreateTranscoderRequest {
/** Display name of the cloud transcoder. */
name: string;
/**
* DNS prefix for the transcoder publisher.
* Used to construct the DNS name which follows the format of `dnsPrefix-accountId.transcoder.millicast.com`.
* @remarks Note that underscores (_) are invalid characters.
*/
dnsPrefix?: string;
/** A string corresponding to the region that this transcoder will be deployed to. */
cluster: string;
/** Resolution of input stream specified in video height. */
height: number;
/** Frame rate of input stream. */
frameRate: number;
/** Specify profile name to select non-standard ladders. */
profile?: string;
/** Determine if the instance should start immediately when created. */
startNow?: boolean;
/** Determine if the top layer is passed through or transcoded. */
passThrough?: boolean;
}
/** Represents a cloud transcoder update request. */
export interface UpdateTranscoderRequest {
/** Display name of the cloud transcoder. */
name?: string;
/**
* DNS prefix for the transcoder publisher.
* Used to construct the DNS name which follows the format of `dnsPrefix-accountId.transcoder.millicast.com`.
* @remarks Note that underscores (_) are invalid characters.
*/
dnsPrefix?: string;
/** A string corresponding to the region that this transcoder will be deployed to. */
cluster?: string;
/** Resolution of input stream specified in video height. */
height?: number;
/** Frame rate of input stream. */
frameRate?: number;
/** Specify profile name to select non-standard ladders. */
profile?: string;
/** Determine if the top layer is passed through or transcoded. */
passThrough?: boolean;
}