Replace the microphone with a virtual one fed by playAudio and pushAudio. While nothing is playing it sends silence.
playAudio
pushAudio
Applies to one call; re-enable it for another call. Disabling stops queued audio and releases owned tracks, hooks and audio contexts.
Enable it before the call starts: WhatsApp gets the microphone when the call is placed or accepted.
The page must be allowed to play audio without a user gesture, for example by launching Chrome with --autoplay-policy=no-user-gesture-required.
--autoplay-policy=no-user-gesture-required
WPP.call.enableAudioInjection();await WPP.call.offer('[number]@c.us'); Copy
WPP.call.enableAudioInjection();await WPP.call.offer('[number]@c.us');
Replace the microphone with a virtual one fed by
playAudioandpushAudio. While nothing is playing it sends silence.Applies to one call; re-enable it for another call. Disabling stops queued audio and releases owned tracks, hooks and audio contexts.
Enable it before the call starts: WhatsApp gets the microphone when the call is placed or accepted.
The page must be allowed to play audio without a user gesture, for example by launching Chrome with
--autoplay-policy=no-user-gesture-required.