Skip to content
v2.273.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);

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).