Function clickAudio

Handles the click event for toggling audio in a media session.

clickAudio({ parameters });
  • Parameters

    • parameters: ClickAudioOptions

      The parameters required for handling the audio click event.

    Returns Promise<void>

    A promise that resolves when the audio click event has been handled.

    The function performs the following actions:

    • If the event is audio-only, it shows an alert and exits.
    • If the audio is already on, it handles the logic for turning it off, including checking recording states and permissions.
    • If the audio is off, it checks for admin restrictions, user permissions, and handles the logic for turning the audio on.
    • It updates various states and emits socket events as necessary.