1import type * as kv from "@distilled.cloud/aws/kinesis-video";
2import type * as kvam from "@distilled.cloud/aws/kinesis-video-archived-media";
3import type * as Effect from "effect/Effect";
4import * as Binding from "../../Binding.ts";
5import type { Stream } from "./Stream.ts";
6
7export 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 */
33export 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
48export const GetDASHStreamingSessionURL =
49 Binding.Service<GetDASHStreamingSessionURL>(
50 "AWS.KinesisVideo.GetDASHStreamingSessionURL",
51 );