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

main
ts 36 lines 1.25 KB
Raw
1 import type * as ivs from "@distilled.cloud/aws/ivs";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Channel } from "./Channel.ts";
5
6 /**
7 * Runtime binding for `ivs:StopStream`.
8 *
9 * Disconnects the incoming RTMPS broadcast on the bound {@link Channel}.
10 * Fails with the typed `ChannelNotBroadcasting` tag when the channel is
11 * not live. Many broadcast clients auto-reconnect, so to stop a stream
12 * permanently, first delete or rotate the channel's stream key. The
13 * channel ARN is injected from the binding. Provide the implementation
14 * with `Effect.provide(AWS.IVS.StopStreamHttp)`.
15 * ### Controlling Live Streams
16 * **Example:** Kick the Current Broadcast
17 * ```typescript
18 * // init — bind the operation to the channel
19 * const stopStream = yield* AWS.IVS.StopStream(channel);
20 *
21 * // runtime
22 * yield* stopStream().pipe(
23 * Effect.catchTag("ChannelNotBroadcasting", () => Effect.void),
24 * );
25 * ```
26 *
27 * @binding
28 */
29 export interface StopStream extends Binding.Service<
30 StopStream,
31 "AWS.IVS.StopStream",
32 (
33 channel: Channel,
34 ) => Effect.Effect<() => Effect.Effect<ivs.StopStreamResponse, ivs.StopStreamError>>
35 > {}
36 export const StopStream = Binding.Service<StopStream>("AWS.IVS.StopStream");