Member Junction
    Preparing search index...

    mj-media-controls: a call's microphone, camera and Share buttons, and, when the host shows it, the button that lets an agent see the user's camera and shared screen. Presentational: it shows what is on and emits what the user asks for, and the host starts or stops the media.

    Share is a split button. Its main part asks the browser's picker with no preference, or stops sharing while the user shares. Its arrow opens a menu that asks for an entire screen, a window or a browser tab first and, when the host lists SharePanels, offers "This panel" with one of them. The arrow hides while the user shares.

    With ShowDeviceMenu, the microphone is a split button too: its chevron opens mj-media-device-menu above the controls, to pick the microphone and the camera from the host's Devices. The menu stays open while the user picks, and closes from its close button, the chevron, Escape or a click outside.

    The buttons are circles of one Size. With ShowLabels, each carries a short label beneath it, for a call bar that names its controls.

    Implements

    • OnChanges
    Index

    Constructors

    Properties

    AgentCount: number = 1

    The number of agents in the room: the agent-vision button says "Let agents see me" when there is more than one, "Let the agent see me" otherwise.

    AgentVisionOn: boolean = false

    Whether the user lets an agent see their camera and shared screen.

    AgentVisionToggled: EventEmitter<boolean> = ...

    The user turned the agent's view of their camera and shared screen on (true) or off (false).

    CameraOn: boolean = false

    Whether the camera is on.

    CameraOptional: boolean = false

    The camera is optional in this call, as in a call with an agent, where it starts off and usually stays off. Off is then the normal state: the camera button is neutral while off and filled while on, like a toggle, instead of red while off.

    CameraToggled: EventEmitter<boolean> = ...

    The user asked to turn the camera on (true) or off (false).

    DeviceMenuID: string = ...

    The device menu's element id, for the chevron's aria-controls.

    DeviceMenuOpen: boolean = false

    Whether the device menu is open.

    DeviceSelected: EventEmitter<MediaDeviceSelection> = ...

    The user picked a microphone or a camera in the device menu. The host switches to it.

    MicrophoneOn: boolean = false

    Whether the microphone is on.

    MicrophoneToggled: EventEmitter<boolean> = ...

    The user asked to turn the microphone on (true) or off (false).

    SelectedCameraID: string | null = null

    The camera the device menu shows as picked.

    SelectedMicrophoneID: string | null = null

    The microphone the device menu shows as picked.

    SharePanels: readonly MediaSharePanel[] = []

    Panels of the page the user can share on their own, offered under "This panel". With none it is left out.

    ShareRequested: EventEmitter<MediaShareRequest> = ...

    The user asked to share something.

    ShareSurfaces: readonly ShareSurfaceOption[] = SHARE_SURFACES

    The kinds of display surface the Share menu asks for.

    Sharing: boolean = false

    Whether the user is sharing.

    ShowAgentVision: boolean = false

    Show the button that lets an agent see the user's camera and shared screen. Off by default: a host shows it while an agent is there to watch, and does what the user asks (the button only reports it).

    ShowCamera: boolean = true

    Show the camera button.

    ShowDeviceMenu: boolean = false

    Show the device chevron beside the microphone, which opens the device menu. Off by default. It shows only while Devices lists something to pick.

    ShowLabels: boolean = false

    Show a short label under each button ("Mute", "Video", "Share"), for a call bar that names its controls.

    ShowMicrophone: boolean = true

    Show the microphone button.

    ShowShare: boolean = true

    Show the Share button.

    ShowShareMenu: boolean = true

    Show the Share button's arrow and its menu.

    Size: MjButtonSize = 'md'

    The circles' size: 32, 44 or 52 px. The Share arrow stays small.

    StopShareRequested: EventEmitter<void> = ...

    The user asked to stop sharing.

    Accessors

    • get CameraVariant(): "primary" | "secondary" | "danger"

      How the camera button looks: red while off, unless the camera is optional; filled while an optional camera is on.

      Returns "primary" | "secondary" | "danger"

    Methods

    • Closes the device menu.

      Parameters

      • refocus: boolean = false

        Put focus back on the chevron, as after the menu's close button or Escape, so it is not lost with the menu.

      Returns void

    • A menu left with nothing to pick, or one the host stops offering, closes, so it does not come back by itself.

      Returns void