class FileLocation
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.MediaLive.Alpha.FileLocation |
Go | github.com/aws/aws-cdk-go/awsmedialivealpha/v2#FileLocation |
Java | software.amazon.awscdk.services.medialive.alpha.FileLocation |
Python | aws_cdk.aws_medialive_alpha.FileLocation |
TypeScript (source) | @aws-cdk/aws-medialive-alpha ยป FileLocation |
A reference to a file MediaLive reads at runtime โ for example an input-loss slate image, an avail-blanking image, a burn-in caption font, or a color-correction LUT.
Use the static factory methods to create one from an S3 bucket (which auto-grants the channel role read access) or from a raw URL.
Example
declare const bucket: s3.IBucket;
declare const video: medialive.EncodeConfiguration;
declare const audio: medialive.EncodeConfiguration;
medialive.OutputGroupConfiguration.hls({
name: 'hls',
destinations: [medialive.OutputDestination.toBucket(bucket, 'live/stream')],
outputs: [
{
encodes: [video],
outputName: 'video',
hlsSettings: medialive.HlsSettings.standard({
m3u8Settings: medialive.M3u8Settings.of({
scte35Behavior: medialive.M3u8Scte35Behavior.PASSTHROUGH,
programNum: 1,
}),
}),
},
{
encodes: [audio],
outputName: 'audio',
hlsSettings: medialive.HlsSettings.audioOnly({
audioGroupId: 'program',
audioOnlyImage: medialive.FileLocation.fromBucket(bucket, 'art/cover.png'),
}),
},
],
});
Initializer
new FileLocation()
Methods
| Name | Description |
|---|---|
| static from | Reference a file in an S3 bucket. |
| static url(url, options?) | Reference a file by URL (e.g. an https:// endpoint or an s3ssl:// path). |
static fromBucket(bucket, key)
public static fromBucket(bucket: IBucket, key: string): FileLocation
Parameters
- bucket
IBucketโ The S3 bucket containing the file. - key
stringโ The object key within the bucket (e.g. 'slates/offline.png').
Returns
Reference a file in an S3 bucket.
Automatically grants the channel role read access.
static url(url, options?)
public static url(url: string, options?: FileLocationOptions): FileLocation
Parameters
- url
stringโ The URL MediaLive reads the file from. - options
Fileโ Optional credentials.Location Options
Returns
Reference a file by URL (e.g. an https:// endpoint or an s3ssl:// path).

.NET
Go
Java
Python
TypeScript (