class InputPreference
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.InputPreference |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#InputPreference |
Java | software.amazon.awscdk.services.medialive.alpha.InputPreference |
Python | aws_cdk.aws_medialive_alpha.InputPreference |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป InputPreference |
Input preference when deciding which input to make active after a previously failed input has recovered.
Example
declare const stack: Stack;
declare const primaryInput: medialive.IInput;
declare const secondaryInput: medialive.IInput;
declare const audioSelector: medialive.AudioSelector;
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;
declare const bucket: s3.IBucket;
new medialive.Channel(stack, 'Channel', {
inputs: [{
input: primaryInput,
automaticInputFailover: {
secondaryInput,
inputPreference: medialive.InputPreference.PRIMARY_INPUT_PREFERRED,
errorClearTime: Duration.seconds(3),
failoverConditions: [
medialive.FailoverCondition.inputLoss({ threshold: Duration.millis(1500) }),
medialive.FailoverCondition.audioSilence({ audioSelector, threshold: Duration.seconds(2) }),
medialive.FailoverCondition.videoBlack({ blackDetectThreshold: 0.1, threshold: Duration.seconds(1) }),
],
},
}, {
// The secondary input must also be attached to the channel as its own input.
input: secondaryInput,
}],
outputGroups: [
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [{ encodes: [video, audio], outputName: 'hls_out' }],
}),
],
});
Properties
| Name | Type | Description |
|---|---|---|
| value | string | The underlying string value passed to CloudFormation. |
| static EQUAL_INPUT_PREFERENCE | Input | No preference โ stay on the currently active input even after the other recovers. |
| static PRIMARY_INPUT_PREFERRED | Input | Prefer the primary input โ switch back to it once it has been free of failover conditions for the error-clear time. |
value
Type:
string
The underlying string value passed to CloudFormation.
static EQUAL_INPUT_PREFERENCE
Type:
Input
No preference โ stay on the currently active input even after the other recovers.
static PRIMARY_INPUT_PREFERRED
Type:
Input
Prefer the primary input โ switch back to it once it has been free of failover conditions for the error-clear time.
Methods
| Name | Description |
|---|---|
| static of(value) | A value not yet modelled by AWS CDK. |
static of(value)
public static of(value: string): InputPreference
Parameters
- value
string
Returns
A value not yet modelled by AWS CDK.

.NET
Go
Java
Python
TypeScript (