Media.RequestId
luastra/mediaMedia.RequestId is an opaque numeric identifier allocated for one asynchronous operation. Store it with the operation's purpose so app.resolve can correlate out-of-order completions without inspecting payload text.
Before you use it
Add luastra/media to this module's dependencies in luastra.json, then import it with require("luastra/media"). Declare media.command in luastra.json. Set an admitted queue before playback, start playback from an explicit user action where required, and implement both app.resolve and media_state handling.
How it fits
The type describes queue input, live playback state, or the tagged state-decoding result.
When to use it
Use Media.RequestId as the key in a pending-operation map after starting an asynchronous Media request. Match and remove that key in app.resolve instead of relying on completion order.
Fields or definition
| Parameter | Type / values | Description |
|---|---|---|
| definition | number | Exact alias, union, or callable contract represented by Media.RequestId. |
What happens next
A checked media input/state/result annotation.
Failures and fixes
Missing capability, absent queue, invalid asset/content URI, autoplay policy, interruption, unsupported background behavior, or host failure must remain visible state. Do not optimistically treat command acknowledgement as playback success.
Availability
Public-source alpha API in 0.5.0-alpha; background playback and system controls require target-specific verification.
Exact declaration
export type RequestId = number