SDK y paquetes@styx/clientsoperationsinterfaces

Interface: IPlaybackOperations

Referencia de @styx/clients generada de su TSDoc.

ImplementadoSin versión del tren todavía· generada desde packages/clients/package.json

Página generada desde el TSDoc de @styx/clients. No se edita a mano: bun run docs:gen la regenera y bun run docs:check falla si difiere.

Interface: IPlaybackOperations

Operaciones de playback-svc del SDK, con Result tipado por ruta.

Properties

renewSession

readonly renewSession: (sessionId, capability, opts) => Promise<Result<{ capability: { expiresAt: number; token: string; ttlMs: number; }; }, ResultError<ReplyErrorCode<TreatyResponse<{ 200: { capability: { expiresAt: number; token: string; ttlMs: number; }; }; 401: { code: "unauthenticated" | "reauth-required"; detail?: string; status: 401; title: string; type: string; }; 403: { category: ErrorCategory; code: "PLAYBACK_CAPABILITY_INVALID"; detail?: string; instance?: string; retryable: boolean; status: 403; title: string; type: string; }; 404: { category: ErrorCategory; code: "PLAYBACK_SESSION_NOT_FOUND"; detail?: string; instance?: string; retryable: boolean; status: 404; title: string; type: string; }; 410: { category: ErrorCategory; code: "PLAYBACK_SESSION_EXPIRED"; detail?: string; instance?: string; retryable: boolean; status: 410; title: string; type: string; }; 422: { code: "validation"; detail?: string; on?: string; property?: string; status: 422; title: string; type: string; }; 429: { code: "rate-limited"; detail?: string; status: 429; title: string; type: string; } | { category: ErrorCategory; code: "PLAYBACK_RENEW_RATE_LIMITED"; detail?: string; instance?: string; retryable: boolean; status: 429; title: string; type: string; }; 503: { category: ErrorCategory; code: "PLAYBACK_DAEMON_UNAVAILABLE"; detail?: string; instance?: string; retryable: boolean; status: 503; title: string; type: string; }; }>>>>>

playback.renewSession — SCT de lectura nuevo presentando el vigente (SEC-Z13).

Parameters

sessionId

string

capability

string

opts

IOperationCallOptions

Returns

Promise<Result<{ capability: { expiresAt: number; token: string; ttlMs: number; }; }, ResultError<ReplyErrorCode<TreatyResponse<{ 200: { capability: { expiresAt: number; token: string; ttlMs: number; }; }; 401: { code: "unauthenticated" | "reauth-required"; detail?: string; status: 401; title: string; type: string; }; 403: { category: ErrorCategory; code: "PLAYBACK_CAPABILITY_INVALID"; detail?: string; instance?: string; retryable: boolean; status: 403; title: string; type: string; }; 404: { category: ErrorCategory; code: "PLAYBACK_SESSION_NOT_FOUND"; detail?: string; instance?: string; retryable: boolean; status: 404; title: string; type: string; }; 410: { category: ErrorCategory; code: "PLAYBACK_SESSION_EXPIRED"; detail?: string; instance?: string; retryable: boolean; status: 410; title: string; type: string; }; 422: { code: "validation"; detail?: string; on?: string; property?: string; status: 422; title: string; type: string; }; 429: { code: "rate-limited"; detail?: string; status: 429; title: string; type: string; } | { category: ErrorCategory; code: "PLAYBACK_RENEW_RATE_LIMITED"; detail?: string; instance?: string; retryable: boolean; status: 429; title: string; type: string; }; 503: { category: ErrorCategory; code: "PLAYBACK_DAEMON_UNAVAILABLE"; detail?: string; instance?: string; retryable: boolean; status: 503; title: string; type: string; }; }>>>>>


reportMetrics

readonly reportMetrics: (sessionId, body, opts) => Promise<Result<{ accepted: number; dropped: number; }, ResultError<ReplyErrorCode<TreatyResponse<{ 200: { accepted: number; dropped: number; }; 401: { code: "unauthenticated" | "reauth-required"; detail?: string; status: 401; title: string; type: string; }; 403: { code: "forbidden"; detail?: string; status: 403; title: string; type: string; }; 404: { category: ErrorCategory; code: "PLAYBACK_SESSION_NOT_FOUND"; detail?: string; instance?: string; retryable: boolean; status: 404; title: string; type: string; }; 422: { code: "validation"; detail?: string; on?: string; property?: string; status: 422; title: string; type: string; }; 429: { code: "rate-limited"; detail?: string; status: 429; title: string; type: string; }; }>>>>>

playback.reportMetrics — lote de métricas del reproductor (OB2).

Parameters

sessionId

string

body
events

({ ms: number; origin?: "cta" | "gesture"; phases?: { frame: number; manifest: number; segment: number; session: number; }; prewarmed?: boolean; t: "ttff"; } | { reason: "error" | "paused" | "hidden" | "autoplay_blocked" | "closed"; t: "startup_abandoned"; } | { far: boolean; ms: number; t: "seek"; } | { ms: number; t: "stall"; } | { dir: "up" | "down"; t: "switch"; } | { code: "other" | "network" | "media" | "decode" | "source"; fatal: boolean; t: "error"; })[] = ...

Eventos del lote.

player

"vidstack" | "limeplay" = ...

Reproductor que midió.

opts

IOperationCallOptions

Returns

Promise<Result<{ accepted: number; dropped: number; }, ResultError<ReplyErrorCode<TreatyResponse<{ 200: { accepted: number; dropped: number; }; 401: { code: "unauthenticated" | "reauth-required"; detail?: string; status: 401; title: string; type: string; }; 403: { code: "forbidden"; detail?: string; status: 403; title: string; type: string; }; 404: { category: ErrorCategory; code: "PLAYBACK_SESSION_NOT_FOUND"; detail?: string; instance?: string; retryable: boolean; status: 404; title: string; type: string; }; 422: { code: "validation"; detail?: string; on?: string; property?: string; status: 422; title: string; type: string; }; 429: { code: "rate-limited"; detail?: string; status: 429; title: string; type: string; }; }>>>>>