Skip to content

GetMediaForFragmentList

Source: src/AWS/KinesisVideo/GetMediaForFragmentList.ts

Runtime binding for kinesisvideo:GetMediaForFragmentList (archived media data plane).

Bind this operation to a Stream inside a function runtime to get a callable that resolves the per-stream data endpoint (GetDataEndpoint) and downloads MKV-packaged media for an explicit list of fragment numbers (typically discovered via ListFragments). The response Payload is a streaming body.

// init
const getFragmentMedia =
yield* AWS.KinesisVideo.GetMediaForFragmentList(stream);
// runtime
const media = yield* getFragmentMedia({
Fragments: fragments.map((f) => f.FragmentNumber!),
});