Skip to content
v2.277.0

Experimental

@aws-cdk/aws-medialive-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

Segment Class ​

The length of a media segment for an output group.

Express the length in whole seconds with {@link Segment.seconds} or in milliseconds with {@link Segment.milliseconds}. Some output groups (e.g. HLS) only support whole-second segments and will reject sub-second millisecond values.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as medialive_alpha from '@aws-cdk/aws-medialive-alpha';
const segment = medialive_alpha.Segment.milliseconds(123);
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_medialive_alpha as medialive_alpha

segment = medialive_alpha.Segment.milliseconds(123)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.medialive.alpha.*;

Segment segment = Segment.milliseconds(123);
csharp
// Install: dotnet add package Amazon.CDK.AWS.MediaLive.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.MediaLive.Alpha;

var segment = Segment.Milliseconds(123);
go
// Install: go get github.com/aws/aws-cdk-go/awsmedialivealpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import medialive_alpha "github.com/aws/aws-cdk-go/awsmedialivealpha"

segment := medialive_alpha.Segment_Milliseconds(jsii.Number(123))

Methods ​

milliseconds(value: number): Segment // chainable@staticmethod def milliseconds(value: int | float) -> Segmentpublic static Segment milliseconds(Number value)public static Segment Milliseconds(double value)func Milliseconds(Value *float64) Segmentstatic#
A segment length in milliseconds.
1 parameter

Parameters

  • valuevaluevaluevalueValue — Number of milliseconds (non-negative integer).
seconds(value: number): Segment // chainable@staticmethod def seconds(value: int | float) -> Segmentpublic static Segment seconds(Number value)public static Segment Seconds(double value)func Seconds(Value *float64) Segmentstatic#
A segment length in whole seconds.
1 parameter

Parameters

  • valuevaluevaluevalueValue — Number of seconds (non-negative integer).