lib-jitsi-meet
    Preparing search index...

    Class JitsiMediaDevices

    Media devices utilities for Jitsi.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Executes callback with list of media devices connected.

      Parameters

      • callback: (devices: MediaDeviceInfo[]) => void

      Returns void

    • Returns currently used audio output device id, 'default' stands for default device

      Returns string

    • Gets the permission status of a capture device, combining the Permissions API with the getUserMedia results.

      Parameters

      • type: MediaType

        The media type, audio or video.

      Returns Promise<IPermissionStatus>

      • Undefined while nothing is known yet, e.g. when the Permissions API isn't supported and getUserMedia wasn't called.
    • Returns whether the audio output device is switched by the audio output manager (config audioOutput.manager), which determines what setAudioOutputDevice resolves with.

      Returns boolean

    • Returns true if changing the input (camera / microphone) or output (audio) device is supported and false if not.

      Parameters

      • OptionaldeviceType: string

        type of device to change. Default is undefined or 'input', 'output' - for audio output device change.

      Returns boolean

      true if available, false otherwise.

    • Checks if the permission for the given device was granted.

      Parameters

      • Optionaltype: MediaType

        type of devices to check, undefined stands for both 'audio' and 'video' together

      Returns Promise<boolean>

    • Returns true if it is possible to be simultaneously capturing audio from more than one device.

      Returns boolean

    • Sets current audio output device.

      Parameters

      • deviceId: string

        id of 'audiooutput' device from navigator.mediaDevices.enumerateDevices(), 'default' is for default device

      Returns Promise<void | JitsiTrack[]>

      • resolves when audio output is changed, is rejected otherwise. With the audio output manager (config audioOutput.manager), resolves once every audio element has switched, with the tracks that still play out of the previous device ([] when all switched), and is rejected, with nothing changed, when the device cannot be used or no element could be switched to it. A newer change then ends the running one, which rejects with an error named SupersededError.