Experimental
@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
InputLossBehavior Struct
Behavior on input loss: substitute black, optionally repeat the last frame, then show a solid color or a slate image.
Example
ts
declare const slateBucket: s3.IBucket;
const inputLoss: medialive.InputLossBehavior = {
blackFrame: Duration.seconds(1),
repeatFrame: Duration.seconds(5),
imageType: medialive.InputLossImageType.SLATE,
imageSlate: medialive.FileLocation.fromBucket(slateBucket, 'slates/offline.png'),
};
python
# slate_bucket: s3.IBucket
input_loss = medialive.InputLossBehavior(
black_frame=Duration.seconds(1),
repeat_frame=Duration.seconds(5),
image_type=medialive.InputLossImageType.SLATE,
image_slate=medialive.FileLocation.from_bucket(slate_bucket, "slates/offline.png")
)
java
IBucket slateBucket;
InputLossBehavior inputLoss = InputLossBehavior.builder()
.blackFrame(Duration.seconds(1))
.repeatFrame(Duration.seconds(5))
.imageType(InputLossImageType.SLATE)
.imageSlate(FileLocation.fromBucket(slateBucket, "slates/offline.png"))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
IBucket slateBucket;
var inputLoss = new InputLossBehavior {
BlackFrame = Duration.Seconds(1),
RepeatFrame = Duration.Seconds(5),
ImageType = InputLossImageType.SLATE,
ImageSlate = FileLocation.FromBucket(slateBucket, "slates/offline.png")
};
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
var slateBucket IBucket
inputLoss := &InputLossBehavior{
BlackFrame: awscdk.Duration_Seconds(jsii.Number(1)),
RepeatFrame: awscdk.Duration_*Seconds(jsii.Number(5)),
ImageType: medialive.InputLossImageType_SLATE(),
ImageSlate: medialive.FileLocation_FromBucket(slateBucket, jsii.String("slates/offline.png")),
}
Properties
blackFrameoptionalDurationblack_frameoptionalDurationblackFrameoptionalDurationBlackFrameoptionalDurationBlackFrameoptionalDuration#How long to substitute black before showing the input-loss image (up to Duration.seconds(1000); Duration.seconds(1000) is interpreted as infinite).
Default: service default
imageColoroptionalstringimage_coloroptionalstrimageColoroptionalStringImageColoroptionalstringImageColoroptional*string#The image color as 6 hex characters (RGB).
Default: service default
Used when InputLossImageType.COLOR.
imageSlateoptionalFileLocationimage_slateoptionalFileLocationimageSlateoptionalFileLocationImageSlateoptionalFileLocationImageSlateoptionalFileLocation#The slate image to display.
Default: service default
Used when imageType is SLATE. Provide a FileLocation referencing an S3 bucket (FileLocation.fromBucket, which auto-grants read access) or a URL (FileLocation.url).
imageTypeoptionalInputLossImageTypeimage_typeoptionalInputLossImageTypeimageTypeoptionalInputLossImageTypeImageTypeoptionalInputLossImageTypeImageTypeoptionalInputLossImageType#Whether to substitute a solid color or a slate image after the black period.
Default: service default
repeatFrameoptionalDurationrepeat_frameoptionalDurationrepeatFrameoptionalDurationRepeatFrameoptionalDurationRepeatFrameoptionalDuration#How long to repeat the previous picture before substituting black (up to Duration.seconds(1000); Duration.seconds(1000) is interpreted as infinite).
Default: service default