Skip to main content

request_audio_output

Function request_audio_output 

Source
pub fn request_audio_output(sender: &JobSender) -> Result<(), SendError>
Expand description

Ask sender’s audio world to open its output device.

The request travels as a job: it lands in the world’s queue and is honoured on the tick that drains it, which on the web is the same frame the user’s click ran in — inside the browser’s sticky activation, so the context that tick opens is allowed to start. Asking a world that does not open on request costs nothing; asking twice is harmless.

§Errors

Errors when the queue is full or the world has stopped, like any job.