Skip to content

Commit

Permalink
feat(client-ivs): This release provides the flexibility to configure …
Browse files Browse the repository at this point in the history
…what renditions or thumbnail qualities to record when creating recording configuration.
  • Loading branch information
awstools committed Jul 17, 2023
1 parent 8463589 commit 7850f23
Show file tree
Hide file tree
Showing 8 changed files with 411 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ export interface BatchStartViewerSessionRevocationCommandOutput
* @see {@link BatchStartViewerSessionRevocationCommandOutput} for command's `response` shape.
* @see {@link IvsClientResolvedConfig | config} for IvsClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* <p/>
*
* @throws {@link PendingVerification} (client fault)
* <p/>
*
* @throws {@link ThrottlingException} (client fault)
* <p/>
*
* @throws {@link ValidationException} (client fault)
* <p/>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,18 @@ export interface CreateRecordingConfigurationCommandOutput
* thumbnailConfiguration: { // ThumbnailConfiguration
* recordingMode: "STRING_VALUE",
* targetIntervalSeconds: Number("long"),
* resolution: "STRING_VALUE",
* storage: [ // ThumbnailConfigurationStorageList
* "STRING_VALUE",
* ],
* },
* recordingReconnectWindowSeconds: Number("int"),
* renditionConfiguration: { // RenditionConfiguration
* renditionSelection: "STRING_VALUE",
* renditions: [ // RenditionConfigurationRenditionList
* "STRING_VALUE",
* ],
* },
* };
* const command = new CreateRecordingConfigurationCommand(input);
* const response = await client.send(command);
Expand All @@ -93,8 +103,18 @@ export interface CreateRecordingConfigurationCommandOutput
* // thumbnailConfiguration: { // ThumbnailConfiguration
* // recordingMode: "STRING_VALUE",
* // targetIntervalSeconds: Number("long"),
* // resolution: "STRING_VALUE",
* // storage: [ // ThumbnailConfigurationStorageList
* // "STRING_VALUE",
* // ],
* // },
* // recordingReconnectWindowSeconds: Number("int"),
* // renditionConfiguration: { // RenditionConfiguration
* // renditionSelection: "STRING_VALUE",
* // renditions: [ // RenditionConfigurationRenditionList
* // "STRING_VALUE",
* // ],
* // },
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,18 @@ export interface GetRecordingConfigurationCommandOutput extends GetRecordingConf
* // thumbnailConfiguration: { // ThumbnailConfiguration
* // recordingMode: "STRING_VALUE",
* // targetIntervalSeconds: Number("long"),
* // resolution: "STRING_VALUE",
* // storage: [ // ThumbnailConfigurationStorageList
* // "STRING_VALUE",
* // ],
* // },
* // recordingReconnectWindowSeconds: Number("int"),
* // renditionConfiguration: { // RenditionConfiguration
* // renditionSelection: "STRING_VALUE",
* // renditions: [ // RenditionConfigurationRenditionList
* // "STRING_VALUE",
* // ],
* // },
* // },
* // };
*
Expand Down
10 changes: 10 additions & 0 deletions clients/client-ivs/src/commands/GetStreamSessionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,18 @@ export interface GetStreamSessionCommandOutput extends GetStreamSessionResponse,
* // thumbnailConfiguration: { // ThumbnailConfiguration
* // recordingMode: "STRING_VALUE",
* // targetIntervalSeconds: Number("long"),
* // resolution: "STRING_VALUE",
* // storage: [ // ThumbnailConfigurationStorageList
* // "STRING_VALUE",
* // ],
* // },
* // recordingReconnectWindowSeconds: Number("int"),
* // renditionConfiguration: { // RenditionConfiguration
* // renditionSelection: "STRING_VALUE",
* // renditions: [ // RenditionConfigurationRenditionList
* // "STRING_VALUE",
* // ],
* // },
* // },
* // truncatedEvents: [ // StreamEvents
* // { // StreamEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ export interface StartViewerSessionRevocationCommandOutput
* @throws {@link InternalServerException} (server fault)
* <p/>
*
* @throws {@link PendingVerification} (client fault)
* <p/>
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p/>
*
* @throws {@link ThrottlingException} (client fault)
* <p/>
*
Expand Down
230 changes: 173 additions & 57 deletions clients/client-ivs/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,56 @@ export interface BatchStartViewerSessionRevocationResponse {
errors?: BatchStartViewerSessionRevocationError[];
}

/**
* @public
* <p/>
*/
export class PendingVerification extends __BaseException {
readonly name: "PendingVerification" = "PendingVerification";
readonly $fault: "client" = "client";
/**
* <p> Your account is pending verification. </p>
*/
exceptionMessage?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<PendingVerification, __BaseException>) {
super({
name: "PendingVerification",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, PendingVerification.prototype);
this.exceptionMessage = opts.exceptionMessage;
}
}

/**
* @public
* <p/>
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
readonly $fault: "client" = "client";
/**
* <p>Request was denied due to request throttling.</p>
*/
exceptionMessage?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
super({
name: "ThrottlingException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
this.exceptionMessage = opts.exceptionMessage;
}
}

/**
* @public
* <p/>
Expand Down Expand Up @@ -531,31 +581,6 @@ export interface CreateChannelResponse {
streamKey?: StreamKey;
}

/**
* @public
* <p/>
*/
export class PendingVerification extends __BaseException {
readonly name: "PendingVerification" = "PendingVerification";
readonly $fault: "client" = "client";
/**
* <p> Your account is pending verification. </p>
*/
exceptionMessage?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<PendingVerification, __BaseException>) {
super({
name: "PendingVerification",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, PendingVerification.prototype);
this.exceptionMessage = opts.exceptionMessage;
}
}

/**
* @public
* <p/>
Expand Down Expand Up @@ -655,6 +680,62 @@ export interface DestinationConfiguration {
s3?: S3DestinationConfiguration;
}

/**
* @public
* @enum
*/
export const RenditionConfigurationRendition = {
FULL_HD: "FULL_HD",
HD: "HD",
LOWEST_RESOLUTION: "LOWEST_RESOLUTION",
SD: "SD",
} as const;

/**
* @public
*/
export type RenditionConfigurationRendition =
(typeof RenditionConfigurationRendition)[keyof typeof RenditionConfigurationRendition];

/**
* @public
* @enum
*/
export const RenditionConfigurationRenditionSelection = {
ALL: "ALL",
CUSTOM: "CUSTOM",
NONE: "NONE",
} as const;

/**
* @public
*/
export type RenditionConfigurationRenditionSelection =
(typeof RenditionConfigurationRenditionSelection)[keyof typeof RenditionConfigurationRenditionSelection];

/**
* @public
* <p>Object that describes which renditions should be recorded for a stream.</p>
*/
export interface RenditionConfiguration {
/**
* <p>Indicates which set of renditions are recorded for a stream. For <code>BASIC</code>
* channels, the <code>CUSTOM</code> value has no effect. If <code>CUSTOM</code> is specified, a
* set of renditions must be specified in the <code>renditions</code> field. Default:
* <code>ALL</code>.</p>
*/
renditionSelection?: RenditionConfigurationRenditionSelection | string;

/**
* <p>Indicates which renditions are recorded for a stream, if <code>renditionSelection</code>
* is <code>CUSTOM</code>; otherwise, this field is irrelevant. The selected renditions are
* recorded if they are available during the stream. If a selected rendition is unavailable, the
* best available rendition is recorded. For details on the resolution dimensions of each
* rendition, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/record-to-s3.html">Auto-Record to Amazon S3</a>.</p>
*/
renditions?: (RenditionConfigurationRendition | string)[];
}

/**
* @public
* @enum
Expand All @@ -669,6 +750,38 @@ export const RecordingMode = {
*/
export type RecordingMode = (typeof RecordingMode)[keyof typeof RecordingMode];

/**
* @public
* @enum
*/
export const ThumbnailConfigurationResolution = {
FULL_HD: "FULL_HD",
HD: "HD",
LOWEST_RESOLUTION: "LOWEST_RESOLUTION",
SD: "SD",
} as const;

/**
* @public
*/
export type ThumbnailConfigurationResolution =
(typeof ThumbnailConfigurationResolution)[keyof typeof ThumbnailConfigurationResolution];

/**
* @public
* @enum
*/
export const ThumbnailConfigurationStorage = {
LATEST: "LATEST",
SEQUENTIAL: "SEQUENTIAL",
} as const;

/**
* @public
*/
export type ThumbnailConfigurationStorage =
(typeof ThumbnailConfigurationStorage)[keyof typeof ThumbnailConfigurationStorage];

/**
* @public
* <p>An object representing a configuration of thumbnails for recorded video.</p>
Expand All @@ -683,15 +796,33 @@ export interface ThumbnailConfiguration {
* <p>The targeted thumbnail-generation interval in seconds. This is configurable (and required)
* only if <code>recordingMode</code> is <code>INTERVAL</code>. Default: 60.</p>
* <p>
* <b>Important:</b> Setting a value for
* <code>targetIntervalSeconds</code> does not guarantee that thumbnails are generated at the
* specified interval. For thumbnails to be generated at the <code>targetIntervalSeconds</code>
* interval, the <code>IDR/Keyframe</code> value for the input video must be less than the
* <code>targetIntervalSeconds</code> value. See <a href="https://docs.aws.amazon.com/ivs/latest/userguide/streaming-config.html"> Amazon IVS Streaming Configuration</a>
* for information on setting <code>IDR/Keyframe</code> to the recommended value in video-encoder
* settings.</p>
* <b>Important:</b> For the <code>BASIC</code> channel type,
* setting a value for <code>targetIntervalSeconds</code> does not guarantee that thumbnails are
* generated at the specified interval. For thumbnails to be generated at the
* <code>targetIntervalSeconds</code> interval, the <code>IDR/Keyframe</code> value for the
* input video must be less than the <code>targetIntervalSeconds</code> value. See <a href="https://docs.aws.amazon.com/ivs/latest/userguide/streaming-config.html"> Amazon IVS Streaming
* Configuration</a> for information on setting <code>IDR/Keyframe</code> to the
* recommended value in video-encoder settings.</p>
*/
targetIntervalSeconds?: number;

/**
* <p>Indicates the desired resolution of recorded thumbnails. Thumbnails are recorded at the
* selected resolution if the corresponding rendition is available during the stream; otherwise,
* they are recorded at source resolution. For more information about resolution values and their
* corresponding height and width dimensions, see <a href="https://docs.aws.amazon.com/ivs/latest/userguide/record-to-s3.html">Auto-Record to Amazon S3</a>. Default:
* Null (source resolution is returned).</p>
*/
resolution?: ThumbnailConfigurationResolution | string;

/**
* <p>Indicates the format in which thumbnails are recorded. <code>SEQUENTIAL</code> records all
* generated thumbnails in a serial manner, to the media/thumbnails directory.
* <code>LATEST</code> saves the latest thumbnail in media/latest_thumbnail/thumb.jpg and
* overwrites it at the interval specified by <code>targetIntervalSeconds</code>. You can enable
* both <code>SEQUENTIAL</code> and <code>LATEST</code>. Default: <code>SEQUENTIAL</code>.</p>
*/
storage?: (ThumbnailConfigurationStorage | string)[];
}

/**
Expand Down Expand Up @@ -728,6 +859,11 @@ export interface CreateRecordingConfigurationRequest {
* streams will be considered a single broadcast and merged together. Default: 0.</p>
*/
recordingReconnectWindowSeconds?: number;

/**
* <p>Object that describes which renditions should be recorded for a stream.</p>
*/
renditionConfiguration?: RenditionConfiguration;
}

/**
Expand Down Expand Up @@ -791,6 +927,11 @@ export interface RecordingConfiguration {
* streams will be considered a single broadcast and merged together. Default: 0.</p>
*/
recordingReconnectWindowSeconds?: number;

/**
* <p>Object that describes which renditions should be recorded for a stream.</p>
*/
renditionConfiguration?: RenditionConfiguration;
}

/**
Expand Down Expand Up @@ -1898,31 +2039,6 @@ export interface PutMetadataRequest {
metadata: string | undefined;
}

/**
* @public
* <p/>
*/
export class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException" = "ThrottlingException";
readonly $fault: "client" = "client";
/**
* <p>Request was denied due to request throttling.</p>
*/
exceptionMessage?: string;
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>) {
super({
name: "ThrottlingException",
$fault: "client",
...opts,
});
Object.setPrototypeOf(this, ThrottlingException.prototype);
this.exceptionMessage = opts.exceptionMessage;
}
}

/**
* @public
*/
Expand Down
Loading

0 comments on commit 7850f23

Please sign in to comment.