play_ringtone
play_ringtone
Play a named ringtone by country code. A typed convenience over play()
that builds the {"type": "ringtone", "params": {...}} media item for you.
Parameters
name
Ringtone name, a country code such as "us".
duration
Seconds to play the ringtone. Keyword-only.
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.