Skip to content

PlaybackKeyPair

Source: src/AWS/IVS/PlaybackKeyPair.ts

An Amazon IVS playback key pair for private channels.

Import the public half of an ECDSA P-384 key pair; sign viewer playback authorization tokens with the private half. Channels created with authorized: true require viewers to present a token signed by an imported key pair.

import * as IVS from "alchemy/AWS/IVS";
const keyPair = yield* IVS.PlaybackKeyPair("ViewerAuth", {
publicKeyMaterial: PUBLIC_KEY_PEM, // ECDSA P-384 public key
});
const channel = yield* IVS.Channel("PrivateChannel", {
authorized: true,
});