class CaptionFontSize
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.CaptionFontSize |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#CaptionFontSize |
Java | software.amazon.awscdk.services.medialive.alpha.CaptionFontSize |
Python | aws_cdk.aws_medialive_alpha.CaptionFontSize |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป CaptionFontSize |
Font size for burn-in and DVB-Sub captions.
Use {@link CaptionFontSize.AUTO} to scale the font size with the output resolution, or {@link CaptionFontSize.of} to set an exact size in points.
Example
// Define a caption selector on the input attachment (see Input Attachment Settings below)
const captionSelector = medialive.CaptionSelector.embedded('captions');
// WebVTT captions โ packaged alongside the video encode in the same output
const webvtt = medialive.EncodeConfiguration.caption({
name: 'eng_webvtt',
captionSelectorName: captionSelector.name,
languageCode: 'eng',
languageDescription: 'English',
destination: medialive.CaptionDestination.webvtt(),
});
// Burned-in captions โ rendered into the video, styled via the burn-in options
const burnIn = medialive.EncodeConfiguration.caption({
name: 'eng_burnin',
captionSelectorName: captionSelector.name,
destination: medialive.CaptionDestination.burnIn({
alignment: medialive.CaptionAlignment.CENTERED,
fontColor: medialive.CaptionFontColor.WHITE,
outlineColor: medialive.CaptionOutlineColor.BLACK,
fontSize: medialive.CaptionFontSize.AUTO,
}),
});
Properties
| Name | Type | Description |
|---|---|---|
| static AUTO | Caption | Scale the font size automatically to match the output resolution. |
static AUTO
Type:
Caption
Scale the font size automatically to match the output resolution.
Methods
| Name | Description |
|---|---|
| static of(points) | An exact font size, in points. |
static of(points)
public static of(points: number): CaptionFontSize
Parameters
- points
numberโ the font size in points;
Returns
An exact font size, in points.

.NET
Go
Java
Python
TypeScript (