@wppconnect/wa-js - v4.7.2
    Preparing search index...

    Function enableAudioInjection

    • Replace the microphone with a virtual one fed by playAudio and pushAudio. 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.

      Parameters

      • enabled: boolean = true

      Returns void

      WPP.call.enableAudioInjection();
      await WPP.call.offer('[number]@c.us');