Member Junction
    Preparing search index...

    The panels of the page the user can share on their own, and which of them a Share menu offers. Panels register themselves, mostly through the [mjSharePanel] directive; a call's Share menu lists the ones on screen under "This panel" (PanelsFor$) and looks the picked one up by its key (Get).

    One instance for the app (providedIn: 'root'), so a panel marked in the app's shell and a Share menu inside a call meet here without knowing each other.

    On screen means the panel's box overlaps the viewport with a non-zero area, as an IntersectionObserver reports it: a panel scrolled away, collapsed or hidden (display: none) is not listed. What lies over a panel does not count. Without IntersectionObserver, every registered panel counts as on screen.

    Changes reach PanelsFor$ and Removed$ in a microtask: a panel that registers or goes away while Angular renders (a directive's ngOnInit or ngOnDestroy) changes what a menu shows in the next pass, not in the middle of the one under way.

    Implements

    • OnDestroy
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    Supported: boolean

    Whether this browser can share a single panel: it has getDisplayMedia and Element or Region Capture (Chrome and Edge on the desktop). Read once. Where it is false, PanelsFor$ lists nothing, so no menu offers a panel.

    Accessors

    • get Removed$(): Observable<string>

      The key of each panel as it is taken off the registry, such as when its element goes away.

      Returns Observable<string>

    Methods

    • A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

      Returns void

    • The panels a Share menu inside host offers, now and on every change: those on screen, in page order, leaving out any panel that contains host (sharing it would show the call its own controls). Empty where the browser cannot share a single panel (Supported).

      Parameters

      • host: Element

        The element the Share menu belongs to, such as the call's own element.

      Returns Observable<readonly MediaSharePanel[]>

    • Registers an element as a panel the user can share on its own.

      Parameters

      • element: Element

        The element a share of the panel shows.

      • label: string

        The panel's name in the Share menu and in the share preview. Not empty.

      • icon: string | null = null

        Font Awesome classes for its menu item.

      Returns SharePanelRegistration

      The registration, to rename the panel or take it off the registry.