Plugins can play sounds and speak aloud, capped per session, on macOS and browser hosts only.
What's wrong with this entry?
Plugins get two new calls, $.audio.play and $.audio.speak. Playback works only where there is a player: a browser host, or macOS via afplay for clips and say for speech. On Linux and Windows terminals playing a clip does nothing and speaking is rejected. Each plugin has a cap on total plays per session and on concurrent plays.
- A clip is exactly one of
asset(a path inside the plugin's own directory),url(fetched through the same URL safety check used elsewhere), orbase64plusmime. There is a byte cap on the clip. loopis optional and requires a signal to stop it.gainis clamped to a maximum.- Speech prefers the browser
speechSynthesisAPI when present, then macOSsay.
$.audio.play: clip must be { asset }, { url } or { base64, mime }
Strings lifted out of the shipped bundle, so the claim above can be checked against them.