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

main
ts 50 lines 1.54 KB
Raw
1 import type * as kv from "@distilled.cloud/aws/kinesis-video";
2 import type * as kvam from "@distilled.cloud/aws/kinesis-video-archived-media";
3 import * as Binding from "alchemy/Binding";
4 import type * as Effect from "effect/Effect";
5 import type { Stream } from "./Stream.ts";
6
7 export interface GetDASHStreamingSessionURLRequest extends Omit<
8 kvam.GetDASHStreamingSessionURLInput,
9 "StreamName" | "StreamARN"
10 > {}
11
12 /**
13 * Runtime binding for `kinesisvideo:GetDASHStreamingSessionURL` (archived
14 * media data plane).
15 *
16 * Bind this operation to a `Stream` inside a function runtime to get a
17 * callable that resolves the per-stream data endpoint (`GetDataEndpoint`)
18 * and returns a short-lived MPEG-DASH playback URL.
19 * ### Reading Media
20 * **Example:** Live DASH Playback URL
21 * ```typescript
22 * // init
23 * const getDash = yield* AWS.KinesisVideo.GetDASHStreamingSessionURL(stream);
24 *
25 * // runtime
26 * const { DASHStreamingSessionURL } = yield* getDash({
27 * PlaybackMode: "LIVE",
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface GetDASHStreamingSessionURL extends Binding.Service<
34 GetDASHStreamingSessionURL,
35 "AWS.KinesisVideo.GetDASHStreamingSessionURL",
36 <S extends Stream>(
37 stream: S,
38 ) => Effect.Effect<
39 (
40 request?: GetDASHStreamingSessionURLRequest,
41 ) => Effect.Effect<
42 kvam.GetDASHStreamingSessionURLOutput,
43 kvam.GetDASHStreamingSessionURLError | kv.GetDataEndpointError
44 >
45 >
46 > {}
47
48 export const GetDASHStreamingSessionURL = Binding.Service<GetDASHStreamingSessionURL>(
49 "AWS.KinesisVideo.GetDASHStreamingSessionURL",
50 );