Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class AVMaster

    The master Audio/Video controller instance. This is available as the singleton game.webrtc

    Index

    Properties

    broadcasting: boolean

    A flag to track whether the current user is actively broadcasting their microphone.

    client: AVClient

    The Audio/Video client class

    Methods

    • Internal

      Set up audio level listeners to handle voice activation detection workflow.

      Parameters

      • mode: string

        The currently selected voice broadcasting mode

      Returns void

    • Activate voice detection tracking for a userId on a provided MediaStream. Currently only a MediaStream is supported because MediaStreamTrack processing is not yet supported cross-browser.

      Parameters

      • stream: MediaStream

        The MediaStream which corresponds to that User

      • Optionalms: number

        A number of milliseconds which represents the voice activation volume interval

      Returns void

    • Trigger a change in the audio broadcasting state when using a push-to-talk workflow.

      Parameters

      • intent: boolean

        The user's intent to broadcast. Whether an actual broadcast occurs will depend on whether or not the user has muted their audio feed.

      Returns any

    • A user can broadcast audio if the AV mode is compatible and if they are allowed to broadcast.

      Parameters

      • userId: string

      Returns boolean

    • A user can broadcast video if the AV mode is compatible and if they are allowed to broadcast.

      Parameters

      • userId: string

      Returns boolean

    • A user can share audio if they are allowed to broadcast and if they have not muted themselves or been blocked.

      Parameters

      • userId: string

      Returns boolean

    • A user can share video if they are allowed to broadcast and if they have not hidden themselves or been blocked.

      Parameters

      • userId: string

      Returns boolean

    • Connect to the Audio/Video client.

      Returns Promise<boolean>

      Was the connection attempt successful?

    • Actions which the orchestration layer should take when a peer user disconnects from the audio/video service.

      Returns void

    • Disconnect from the Audio/Video client.

      Returns Promise<boolean>

      Whether an existing connection was terminated?

    • Respond to changes which occur to AV Settings. Changes are handled in descending order of impact.

      Parameters

      • changed: object

        The object of changed AV settings

      Returns Promise<boolean> | undefined

    • Callback actions to take when the user becomes disconnected from the server.

      Returns Promise<void>