The best way to control Claude Code, Codex and more from any computer or phone

main
ts 46 lines 1.42 KB
Raw
1 import type * as ivsrealtime from "@distilled.cloud/aws/ivs-realtime";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Stage } from "./Stage.ts";
5
6 /** The `stageArn` is injected by the binding from the bound stage. */
7 export interface StartCompositionRequest extends Omit<
8 ivsrealtime.StartCompositionRequest,
9 "stageArn"
10 > {}
11
12 /**
13 * Start a server-side composition of the bound stage — IVS mixes the
14 * stage's participants into a single video according to the `layout` and
15 * delivers it to the given `destinations` (an IVS low-latency channel
16 * and/or an S3 storage configuration).
17 *
18 * ### Compositing a Stage
19 * **Example:** Composite a stage into an IVS channel
20 * ```typescript
21 * // init
22 * const startComposition = yield* IVSRealtime.StartComposition(stage);
23 *
24 * // runtime
25 * const { composition } = yield* startComposition({
26 * destinations: [{ channel: { channelArn } }],
27 * layout: { grid: { videoAspectRatio: "VIDEO" } },
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface StartComposition extends Binding.Service<
34 StartComposition,
35 "AWS.IVSRealtime.StartComposition",
36 (
37 stage: Stage,
38 ) => Effect.Effect<
39 (
40 request: StartCompositionRequest,
41 ) => Effect.Effect<ivsrealtime.StartCompositionResponse, ivsrealtime.StartCompositionError>
42 >
43 > {}
44 export const StartComposition = Binding.Service<StartComposition>(
45 "AWS.IVSRealtime.StartComposition",
46 );