1import * as kvws from "@distilled.cloud/aws/kinesis-video-webrtc-storage";
2import * as Layer from "effect/Layer";
3import { makeChannelSignalingHttpBinding } from "./BindingHttp.ts";
4import { JoinStorageSessionAsViewer } from "./JoinStorageSessionAsViewer.ts";
5
6export const JoinStorageSessionAsViewerHttp = Layer.effect(
7 JoinStorageSessionAsViewer,
8 makeChannelSignalingHttpBinding({
9 tag: "AWS.KinesisVideo.JoinStorageSessionAsViewer",
10 // served by the channel's WEBRTC storage endpoint (only available once
11 // media storage is configured for the channel)
12 protocol: "WEBRTC",
13 role: "VIEWER",
14 actions: ["kinesisvideo:JoinStorageSessionAsViewer"],
15 key: "channelArn",
16 operation: kvws.joinStorageSessionAsViewer,
17 }),
18);