AWS.MediaTailor reference
CreatePrefetchSchedule
Section titled “CreatePrefetchSchedule”Source:
src/AWS/MediaTailor/CreatePrefetchSchedule.ts
Runtime binding for mediatailor:CreatePrefetchSchedule — tell MediaTailor
to fetch and prepare ads for upcoming ad breaks ahead of time (e.g. right
before a live event’s scheduled break) so avails fill without ADS latency.
The bound PlaybackConfiguration’s name is injected; the grant is
scoped to that configuration’s prefetch-schedule ARN space. Provide the
implementation with Effect.provide(AWS.MediaTailor.CreatePrefetchScheduleHttp).
CreatePrefetchSchedule: Prefetching Ads
Section titled “CreatePrefetchSchedule: Prefetching Ads”const createPrefetchSchedule = yield* AWS.MediaTailor.CreatePrefetchSchedule(config);
const schedule = yield* createPrefetchSchedule({ Name: `event-${eventId}`, Retrieval: { EndTime: retrievalDeadline }, Consumption: { EndTime: breakEnd },});CreateProgram
Section titled “CreateProgram”Source:
src/AWS/MediaTailor/CreateProgram.ts
Runtime binding for mediatailor:CreateProgram — schedule a VOD or live
source as a program on a channel-assembly channel. Dynamic program
scheduling is the core runtime workflow of channel assembly: applications
insert programs into a linear channel’s schedule as content becomes
available.
Channel/program names are runtime parameters, so the binding is
account-level and grants mediatailor:CreateProgram on *. Provide the
implementation with Effect.provide(AWS.MediaTailor.CreateProgramHttp).
CreateProgram: Channel Assembly
Section titled “CreateProgram: Channel Assembly”const createProgram = yield* AWS.MediaTailor.CreateProgram();
yield* createProgram({ ChannelName: "my-channel", ProgramName: `episode-${id}`, SourceLocationName: "my-origin", VodSourceName: "episode-1", ScheduleConfiguration: { Transition: { Type: "RELATIVE", RelativePosition: "AFTER_PROGRAM" } },});DeletePrefetchSchedule
Section titled “DeletePrefetchSchedule”Source:
src/AWS/MediaTailor/DeletePrefetchSchedule.ts
Runtime binding for mediatailor:DeletePrefetchSchedule — remove a
prefetch schedule from the bound PlaybackConfiguration (e.g. when
a live event is cancelled).
Provide the implementation with
Effect.provide(AWS.MediaTailor.DeletePrefetchScheduleHttp).
DeletePrefetchSchedule: Prefetching Ads
Section titled “DeletePrefetchSchedule: Prefetching Ads”const deletePrefetchSchedule = yield* AWS.MediaTailor.DeletePrefetchSchedule(config);
yield* deletePrefetchSchedule({ Name: `event-${eventId}` });DeleteProgram
Section titled “DeleteProgram”Source:
src/AWS/MediaTailor/DeleteProgram.ts
Runtime binding for mediatailor:DeleteProgram — remove a scheduled
program from a channel-assembly channel.
Channel/program names are runtime parameters, so the binding is
account-level and grants mediatailor:DeleteProgram on *. Provide the
implementation with Effect.provide(AWS.MediaTailor.DeleteProgramHttp).
DeleteProgram: Channel Assembly
Section titled “DeleteProgram: Channel Assembly”const deleteProgram = yield* AWS.MediaTailor.DeleteProgram();
yield* deleteProgram({ ChannelName: "my-channel", ProgramName: `episode-${id}`,});DescribeProgram
Section titled “DescribeProgram”Source:
src/AWS/MediaTailor/DescribeProgram.ts
Runtime binding for mediatailor:DescribeProgram — read a scheduled
program on a channel-assembly channel.
Channel/program names are runtime parameters, so the binding is
account-level and grants mediatailor:DescribeProgram on *. Provide the
implementation with Effect.provide(AWS.MediaTailor.DescribeProgramHttp).
DescribeProgram: Channel Assembly
Section titled “DescribeProgram: Channel Assembly”const describeProgram = yield* AWS.MediaTailor.DescribeProgram();
const program = yield* describeProgram({ ChannelName: "my-channel", ProgramName: `episode-${id}`,});GetChannelSchedule
Section titled “GetChannelSchedule”Source:
src/AWS/MediaTailor/GetChannelSchedule.ts
Runtime binding for mediatailor:GetChannelSchedule — read the current
schedule (programs + ad breaks) of a channel-assembly channel.
Channel names are runtime parameters, so the binding is account-level and
grants mediatailor:GetChannelSchedule on *. Provide the implementation
with Effect.provide(AWS.MediaTailor.GetChannelScheduleHttp).
GetChannelSchedule: Channel Assembly
Section titled “GetChannelSchedule: Channel Assembly”const getChannelSchedule = yield* AWS.MediaTailor.GetChannelSchedule();
const { Items } = yield* getChannelSchedule({ ChannelName: "my-channel" });GetPrefetchSchedule
Section titled “GetPrefetchSchedule”Source:
src/AWS/MediaTailor/GetPrefetchSchedule.ts
Runtime binding for mediatailor:GetPrefetchSchedule — read a prefetch
schedule on the bound PlaybackConfiguration by name.
Provide the implementation with
Effect.provide(AWS.MediaTailor.GetPrefetchScheduleHttp).
GetPrefetchSchedule: Prefetching Ads
Section titled “GetPrefetchSchedule: Prefetching Ads”const getPrefetchSchedule = yield* AWS.MediaTailor.GetPrefetchSchedule(config);
const schedule = yield* getPrefetchSchedule({ Name: `event-${eventId}` });ListAlerts
Section titled “ListAlerts”Source:
src/AWS/MediaTailor/ListAlerts.ts
Runtime binding for mediatailor:ListAlerts — read the operational alerts
MediaTailor raises for a channel-assembly resource (channel, source
location, VOD/live source) identified by ARN.
Resource ARNs are runtime parameters, so the binding is account-level and
grants mediatailor:ListAlerts on *. Provide the implementation with
Effect.provide(AWS.MediaTailor.ListAlertsHttp).
ListAlerts: Channel Assembly
Section titled “ListAlerts: Channel Assembly”const listAlerts = yield* AWS.MediaTailor.ListAlerts();
const { Items } = yield* listAlerts({ ResourceArn: channelArn });ListPrefetchSchedules
Section titled “ListPrefetchSchedules”Source:
src/AWS/MediaTailor/ListPrefetchSchedules.ts
Runtime binding for mediatailor:ListPrefetchSchedules — page through the
prefetch schedules on the bound PlaybackConfiguration, optionally
filtered by StreamId or ScheduleType.
Provide the implementation with
Effect.provide(AWS.MediaTailor.ListPrefetchSchedulesHttp).
ListPrefetchSchedules: Prefetching Ads
Section titled “ListPrefetchSchedules: Prefetching Ads”const listPrefetchSchedules = yield* AWS.MediaTailor.ListPrefetchSchedules(config);
const { Items } = yield* listPrefetchSchedules({ StreamId: streamId });PlaybackConfiguration
Section titled “PlaybackConfiguration”Source:
src/AWS/MediaTailor/PlaybackConfiguration.ts
An AWS Elemental MediaTailor playback configuration for server-side ad insertion (SSAI) into HLS and DASH video streams.
PlaybackConfiguration: Creating Playback Configurations
Section titled “PlaybackConfiguration: Creating Playback Configurations”Basic ad-inserted stream
import * as MediaTailor from "alchemy/AWS/MediaTailor";
const config = yield* MediaTailor.PlaybackConfiguration("Ads", { adDecisionServerUrl: "https://ads.example.com/vast?ip=[client_ip]", videoContentSourceUrl: "https://origin.example.com/live",});Slate fill and personalization threshold
const config = yield* MediaTailor.PlaybackConfiguration("Ads", { adDecisionServerUrl: "https://ads.example.com/vast", videoContentSourceUrl: "https://origin.example.com/vod", slateAdUrl: "https://origin.example.com/slate.mp4", personalizationThreshold: "2 seconds",});PlaybackConfiguration: Manifest Behavior
Section titled “PlaybackConfiguration: Manifest Behavior”const config = yield* MediaTailor.PlaybackConfiguration("Live", { adDecisionServerUrl: "https://ads.example.com/vast", videoContentSourceUrl: "https://origin.example.com/live", manifestProcessingRules: { adMarkerPassthroughEnabled: true }, availSuppression: { mode: "BEHIND_LIVE_EDGE", value: "00:00:30" },});PlaybackConfiguration: Session Logging
Section titled “PlaybackConfiguration: Session Logging”const config = yield* MediaTailor.PlaybackConfiguration("Logged", { adDecisionServerUrl: "https://ads.example.com/vast", videoContentSourceUrl: "https://origin.example.com/live", logConfiguration: { percentEnabled: 10 },});StartChannel
Section titled “StartChannel”Source:
src/AWS/MediaTailor/StartChannel.ts
Runtime binding for mediatailor:StartChannel — start a channel-assembly
channel so it begins producing its linear stream.
Channel names are runtime parameters, so the binding is account-level and
grants mediatailor:StartChannel on *. Provide the implementation with
Effect.provide(AWS.MediaTailor.StartChannelHttp).
StartChannel: Channel Assembly
Section titled “StartChannel: Channel Assembly”const startChannel = yield* AWS.MediaTailor.StartChannel();
yield* startChannel({ ChannelName: "my-channel" });StopChannel
Section titled “StopChannel”Source:
src/AWS/MediaTailor/StopChannel.ts
Runtime binding for mediatailor:StopChannel — stop a running
channel-assembly channel.
Channel names are runtime parameters, so the binding is account-level and
grants mediatailor:StopChannel on *. Provide the implementation with
Effect.provide(AWS.MediaTailor.StopChannelHttp).
StopChannel: Channel Assembly
Section titled “StopChannel: Channel Assembly”const stopChannel = yield* AWS.MediaTailor.StopChannel();
yield* stopChannel({ ChannelName: "my-channel" });UpdateProgram
Section titled “UpdateProgram”Source:
src/AWS/MediaTailor/UpdateProgram.ts
Runtime binding for mediatailor:UpdateProgram — move or re-configure a
scheduled program on a channel-assembly channel (e.g. change its
transition or ad breaks) before it plays.
Channel/program names are runtime parameters, so the binding is
account-level and grants mediatailor:UpdateProgram on *. Provide the
implementation with Effect.provide(AWS.MediaTailor.UpdateProgramHttp).
UpdateProgram: Channel Assembly
Section titled “UpdateProgram: Channel Assembly”const updateProgram = yield* AWS.MediaTailor.UpdateProgram();
yield* updateProgram({ ChannelName: "my-channel", ProgramName: `episode-${id}`, ScheduleConfiguration: { Transition: { ScheduledStartTimeMillis: startAt } },});