Skip to content

InsertAdBreak

Source: src/AWS/IVS/InsertAdBreak.ts

Runtime binding for ivs:InsertAdBreak.

Triggers a server-side ad break of the requested duration in the bound Channel’s active stream (the channel must have an ad configuration attached). Fails with the typed ChannelNotBroadcasting tag when the channel is not live. The channel ARN is injected from the binding. Provide the implementation with Effect.provide(AWS.IVS.InsertAdBreakHttp).

// init — bind the operation to the channel
const insertAdBreak = yield* AWS.IVS.InsertAdBreak(channel);
// runtime
const { adBreakId } = yield* insertAdBreak({ durationSeconds: 30 });