play_audio
play_audio
Play an audio file from a URL. A typed convenience over play() that
builds the {"type": "audio", "params": {"url": ...}} media item for you.
Parameters
url
URL of the audio file to play.
volume
Volume adjustment in dB, from -40.0 to 40.0. Keyword-only.
on_completed
Callback invoked when the operation reaches a terminal state. Can be a regular function or async coroutine. Keyword-only.
Returns
PlayAction — An action handle with stop(), pause(), resume(), volume(), and wait() methods.