Skip to content

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.

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",
});
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" },
});
const config = yield* MediaTailor.PlaybackConfiguration("Logged", {
adDecisionServerUrl: "https://ads.example.com/vast",
videoContentSourceUrl: "https://origin.example.com/live",
logConfiguration: { percentEnabled: 10 },
});