跳转到内容
EN

Get HLS renditions

Code Mode: praxis.media.libraries.assets.hls.list

HTTP: GET /media/v1/libraries/{library_id}/assets/{asset_id}/hls

Read how ready a video asset’s on-demand ladder is, rung by rung, without building anything. Use library_id and asset_id as everywhere else. The answer names the asset, its current version, the asset’s own facts (resource_type, is_audio and duration) and one entry per recorded rung — name, height, the first indexed piece’s width, the rung’s bitrate and stored bytes, and its state (processing while pieces run, ready when every piece is ready, failed when a piece gave up). A ladder that was never requested, and an asset that is not a video, answer an empty renditions rather than an error. This read mints no capability and signs nothing, so play the ladder through the content service, which issues the short-lived play address for the current version. Example: GET /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/hls.

签名

praxis.media.libraries.assets.hls.list(args:{path:{library_id:string;asset_id:string}}):Promise<{/** The video asset this ladder belongs to. */ asset_id:string;/** The asset version the ladder was built for; a later version gets its own ladder. */ version:number;/** One entry per rung recorded for this version, ascending by height; an asset whose ladder was never requested, and an asset that is not a video, answer an empty */ renditions:Array<{/** Clarity rung as its playlist calls it; the height with a p, so 480p is the short side at 480 pixels. */ name:"480p"|"720p"|"1080p";/** Short side of this rung in pixels. */ height:480|720|1080;/** Width of this rung’s first encoded piece, read from that piece’s own index; null while no piece has finished indexing. */ width:number|null;/** Average bitrate of this rung in bits per second, computed from the encoded segments the same way the master playlist’s AVERAGE-BANDWIDTH is; null while nothing */ bitrate:number|null;/** Stored size of this rung so far, in bytes, counting the pieces that are indexed (init segments included); it grows as pieces finish. */ bytes:number;/** Readiness of this rung: processing while any piece is pending or running, ready when every piece is ready, failed when any piece gave up. */ state:"processing"|"ready"|"failed"}>}>;

参数

名称位置类型必填说明
library_idpathstring是Library ID returned by creation.
asset_idpathstring是32-character asset ID.

响应

状态码内容类型说明
200application/jsonSuccessful response.
400application/jsonA selector, cursor, limit or other parameter is invalid; correct the reported field before retrying.
402application/jsonRequest failed; see the error code reference.
403application/jsonThis credential has read-only access to the library; use a write-capable binding for mutations.
404application/jsonThe library or asset is missing, deleted or belongs to another tenant; verify its identifier and owner.
409application/jsonRequest failed; see the error code reference.
413application/jsonThe file exceeds an input limit; provide a smaller source file.
415application/jsonThis media format is unsupported; provide a supported format.
422application/jsonRequest failed; see the error code reference.
429application/jsonA rate limit was reached; wait before retrying.
501application/jsonThe requested operation is unsupported; choose a supported method.
502application/jsonRequest failed; see the error code reference.
503application/jsonHistorical projections are still being initialized, or library storage is temporarily unavailable; retry shortly and check failureSummary counts_complete.