Play an audio file (mp3, wav, ogg/opus, ...) in the call, through the virtual microphone. Resolves when the audio finishes or is stopped.
The page CSP may block downloading from other domains; pass the file content (ArrayBuffer, Blob or a base64 data URL) in that case.
WPP.call.enableAudioInjection();WPP.on('call.accepted', async () => { await WPP.call.playAudio('data:audio/mpeg;base64,...'); await WPP.call.end();}); Copy
WPP.call.enableAudioInjection();WPP.on('call.accepted', async () => { await WPP.call.playAudio('data:audio/mpeg;base64,...'); await WPP.call.end();});
Play an audio file (mp3, wav, ogg/opus, ...) in the call, through the virtual microphone. Resolves when the audio finishes or is stopped.
The page CSP may block downloading from other domains; pass the file content (ArrayBuffer, Blob or a base64 data URL) in that case.