PlaybackRestrictionPolicy
Source:
src/AWS/IVS/PlaybackRestrictionPolicy.ts
An Amazon IVS playback restriction policy, constraining channel playback by viewer country and/or request origin.
Attach the policy to a channel via the channel’s
playbackRestrictionPolicyArn prop. All policy settings are mutable and
update in place.
Restricting Playback
Section titled “Restricting Playback”Restrict Playback by Country and Origin
import * as IVS from "alchemy/AWS/IVS";
const policy = yield* IVS.PlaybackRestrictionPolicy("GeoFence", { allowedCountries: ["US", "CA"], allowedOrigins: ["https://example.com"],});const channel = yield* IVS.Channel("LiveChannel", { playbackRestrictionPolicyArn: policy.playbackRestrictionPolicyArn,});Strict Origin Enforcement
const policy = yield* IVS.PlaybackRestrictionPolicy("StrictFence", { allowedCountries: ["US"], allowedOrigins: ["https://example.com"], enableStrictOriginEnforcement: true,});