Class InputPreference
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.medialive.alpha.InputPreference
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)",
date="2026-09-02T11:03:41.197Z")
@Stability(Experimental)
public class InputPreference
extends software.amazon.jsii.JsiiObject
(experimental) Input preference when deciding which input to make active after a previously failed input has recovered.
Example:
Stack stack;
IInput primaryInput;
IInput secondaryInput;
AudioSelector audioSelector;
EncodeConfiguration video;
EncodeConfiguration audio;
IBucket bucket;
Channel.Builder.create(stack, "Channel")
.inputs(List.of(InputAttachment.builder()
.input(primaryInput)
.automaticInputFailover(AutomaticInputFailover.builder()
.secondaryInput(secondaryInput)
.inputPreference(InputPreference.PRIMARY_INPUT_PREFERRED)
.errorClearTime(Duration.seconds(3))
.failoverConditions(List.of(FailoverCondition.inputLoss(InputLossFailoverProps.builder().threshold(Duration.millis(1500)).build()), FailoverCondition.audioSilence(AudioSilenceFailoverProps.builder().audioSelector(audioSelector).threshold(Duration.seconds(2)).build()), FailoverCondition.videoBlack(VideoBlackFailoverProps.builder().blackDetectThreshold(0.1).threshold(Duration.seconds(1)).build())))
.build())
.build(), InputAttachment.builder()
// The secondary input must also be attached to the channel as its own input.
.input(secondaryInput)
.build()))
.outputGroups(List.of(OutputGroupConfiguration.hls(HlsOutputGroupProps.builder()
.name("hls")
.destinations(List.of(OutputDestination.toBucket(bucket, "live/stream")))
.outputs(List.of(HlsOutputDefinition.builder().encodes(List.of(video, audio)).outputName("hls_out").build()))
.build())))
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InputPreference(experimental) No preference — stay on the currently active input even after the other recovers.static final InputPreference(experimental) Prefer the primary input — switch back to it once it has been free of failover conditions for the error-clear time. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInputPreference(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedInputPreference(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptiongetValue()(experimental) The underlying string value passed to CloudFormation.static InputPreference(experimental) A value not yet modelled by AWS CDK.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
EQUAL_INPUT_PREFERENCE
(experimental) No preference — stay on the currently active input even after the other recovers. -
PRIMARY_INPUT_PREFERRED
(experimental) Prefer the primary input — switch back to it once it has been free of failover conditions for the error-clear time.
-
-
Constructor Details
-
InputPreference
protected InputPreference(software.amazon.jsii.JsiiObjectRef objRef) -
InputPreference
protected InputPreference(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
of
(experimental) A value not yet modelled by AWS CDK.- Parameters:
value- This parameter is required.
-
getValue
(experimental) The underlying string value passed to CloudFormation.
-